feat: change theme
This commit is contained in:
Vendored
+1
-1
@@ -7,7 +7,7 @@
|
|||||||
"type": "dart",
|
"type": "dart",
|
||||||
"program": "lib/main.dart",
|
"program": "lib/main.dart",
|
||||||
"args": [
|
"args": [
|
||||||
"--dart-define=BASE_URL=http://192.168.72.210:8080",
|
"--dart-define=BASE_URL=http://192.168.8.210:8080",
|
||||||
"--target-platform=android-arm64"
|
"--target-platform=android-arm64"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ class AppConfig {
|
|||||||
/// با تغییر شبکه/IP مک، مقدار dart-define یا همین پیشفرض را عوض کنید.
|
/// با تغییر شبکه/IP مک، مقدار dart-define یا همین پیشفرض را عوض کنید.
|
||||||
static const String baseUrl = String.fromEnvironment(
|
static const String baseUrl = String.fromEnvironment(
|
||||||
'BASE_URL',
|
'BASE_URL',
|
||||||
defaultValue: 'http://192.168.72.210:8080',
|
defaultValue: 'http://192.168.8.210:8080',
|
||||||
);
|
);
|
||||||
|
|
||||||
static String get apiUrl => '$baseUrl/api';
|
static String get apiUrl => '$baseUrl/api';
|
||||||
|
|||||||
@@ -3,17 +3,25 @@ import 'package:flutter/material.dart';
|
|||||||
/// تم بصری حکمشو (الهامگرفته از اپ مرجع: قرمز تیره و طلایی).
|
/// تم بصری حکمشو (الهامگرفته از اپ مرجع: قرمز تیره و طلایی).
|
||||||
/// همهی رنگهای پرتکرار اینجا متمرکزند تا در کد بهصورت ثابتِ بینام تکرار نشوند.
|
/// همهی رنگهای پرتکرار اینجا متمرکزند تا در کد بهصورت ثابتِ بینام تکرار نشوند.
|
||||||
class AppColors {
|
class AppColors {
|
||||||
// پایه
|
// پایه — تمِ شاهانهٔ ایران باستان: لاجوردِ تختجمشید + طلا (با شنگرفِ کنتراست).
|
||||||
static const bg = Color(0xFF3A0A12);
|
static const bg = Color(0xFF0E2347); // لاجوردِ شب
|
||||||
static const bgDark = Color(0xFF240108);
|
static const bgDark = Color(0xFF081428); // لاجوردِ تیره
|
||||||
static const panel = Color(0xFF5A0E1A);
|
static const panel = Color(0xFF17345C); // پنلِ نیمهشب آبی
|
||||||
static const gold = Color(0xFFE9B949);
|
static const gold = Color(0xFFE9B949);
|
||||||
static const goldDark = Color(0xFFB8860B);
|
static const goldDark = Color(0xFFB8860B);
|
||||||
static const goldFaint = Color(0x33E9B949); // جداکننده/خطِ طلاییِ کمرنگ
|
static const goldFaint = Color(0x33E9B949); // جداکننده/خطِ طلاییِ کمرنگ
|
||||||
static const accent = Color(0xFFB81D2A);
|
static const accent = Color(0xFFB81D2A); // شنگرفِ ایرانی (کنشِ مهم/خروج)
|
||||||
static const green = Color(0xFF2E7D32);
|
static const green = Color(0xFF2E7D32);
|
||||||
static const text = Color(0xFFF5E9D0);
|
static const text = Color(0xFFF5E9D0);
|
||||||
|
|
||||||
|
// رمپِ لاجوردِ شاهانه (روشن → تیره) برای پسزمینهها، پنلها و میز.
|
||||||
|
static const lapis = Color(0xFF1E5FA8); // فیروزهایِ روشن (تأکید/تب)
|
||||||
|
static const lapisHi = Color(0xFF1C4E8E); // سطحِ روشن (میز/اوال)
|
||||||
|
static const lapisMid = Color(0xFF1B4576); // پنلِ گرادیانِ بالا
|
||||||
|
static const lapisLo = Color(0xFF0C2848); // گرادیانِ پایین
|
||||||
|
static const lapisNight = Color(0xFF071A33); // لبهٔ میز/پسزمینهٔ Flame
|
||||||
|
static const lapisInk = Color(0xFF04101F); // مرکزِ تیرهٔ میز
|
||||||
|
|
||||||
// معنایی (دکمهها/وضعیت/خالها)
|
// معنایی (دکمهها/وضعیت/خالها)
|
||||||
static const success = Color(0xFF3FA34D); // سبزِ روشنِ دکمه
|
static const success = Color(0xFF3FA34D); // سبزِ روشنِ دکمه
|
||||||
static const successDark = Color(0xFF1B5E20); // سبزِ تیره (گرادیان/درخشش)
|
static const successDark = Color(0xFF1B5E20); // سبزِ تیره (گرادیان/درخشش)
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ class GameBackground extends StatelessWidget {
|
|||||||
gradient: RadialGradient(
|
gradient: RadialGradient(
|
||||||
center: Alignment(0, -0.4),
|
center: Alignment(0, -0.4),
|
||||||
radius: 1.3,
|
radius: 1.3,
|
||||||
colors: [Color(0xFF5A0F1E), AppColors.bgDark],
|
colors: [AppColors.lapisMid, AppColors.bgDark],
|
||||||
stops: [0.0, 1.0],
|
stops: [0.0, 1.0],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -65,7 +65,7 @@ class GamePanel extends StatelessWidget {
|
|||||||
gradient: const LinearGradient(
|
gradient: const LinearGradient(
|
||||||
begin: Alignment.topCenter,
|
begin: Alignment.topCenter,
|
||||||
end: Alignment.bottomCenter,
|
end: Alignment.bottomCenter,
|
||||||
colors: [Color(0xFF6E1322), AppColors.bg],
|
colors: [AppColors.lapisMid, AppColors.bg],
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(radius),
|
borderRadius: BorderRadius.circular(radius),
|
||||||
border: Border.all(color: AppColors.gold, width: 2),
|
border: Border.all(color: AppColors.gold, width: 2),
|
||||||
@@ -223,7 +223,7 @@ class StatChip extends StatelessWidget {
|
|||||||
gradient: const LinearGradient(
|
gradient: const LinearGradient(
|
||||||
begin: Alignment.topCenter,
|
begin: Alignment.topCenter,
|
||||||
end: Alignment.bottomCenter,
|
end: Alignment.bottomCenter,
|
||||||
colors: [Color(0xFF2A0610), Color(0xFF14040A)],
|
colors: [AppColors.lapisLo, AppColors.lapisNight],
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(20),
|
borderRadius: BorderRadius.circular(20),
|
||||||
border: Border.all(color: AppColors.goldDark),
|
border: Border.all(color: AppColors.goldDark),
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ class _ChatPanelState extends State<ChatPanel> {
|
|||||||
isScrollable: true,
|
isScrollable: true,
|
||||||
tabAlignment: TabAlignment.center,
|
tabAlignment: TabAlignment.center,
|
||||||
indicator: BoxDecoration(
|
indicator: BoxDecoration(
|
||||||
color: const Color(0xFF7B0E14),
|
color: AppColors.lapis,
|
||||||
borderRadius: BorderRadius.circular(10),
|
borderRadius: BorderRadius.circular(10),
|
||||||
border: Border.all(color: AppColors.gold, width: 1.4),
|
border: Border.all(color: AppColors.gold, width: 1.4),
|
||||||
),
|
),
|
||||||
@@ -146,7 +146,7 @@ class _ChatPanelState extends State<ChatPanel> {
|
|||||||
gradient: const LinearGradient(
|
gradient: const LinearGradient(
|
||||||
begin: Alignment.topCenter,
|
begin: Alignment.topCenter,
|
||||||
end: Alignment.bottomCenter,
|
end: Alignment.bottomCenter,
|
||||||
colors: [Color(0xFF8E0E1B), Color(0xFF5A0A12)],
|
colors: [AppColors.lapisMid, AppColors.lapisLo],
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(16),
|
borderRadius: BorderRadius.circular(16),
|
||||||
border: Border.all(color: AppColors.gold, width: 2),
|
border: Border.all(color: AppColors.gold, width: 2),
|
||||||
@@ -171,7 +171,7 @@ class _ChatPanelState extends State<ChatPanel> {
|
|||||||
),
|
),
|
||||||
child: const Text('بسته چت',
|
child: const Text('بسته چت',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Color(0xFF3A0A12),
|
color: AppColors.lapisInk,
|
||||||
fontSize: 17,
|
fontSize: 17,
|
||||||
fontWeight: FontWeight.bold)),
|
fontWeight: FontWeight.bold)),
|
||||||
),
|
),
|
||||||
@@ -184,7 +184,7 @@ class _ChatPanelState extends State<ChatPanel> {
|
|||||||
onTap: () => Navigator.pop(context),
|
onTap: () => Navigator.pop(context),
|
||||||
child: const CircleAvatar(
|
child: const CircleAvatar(
|
||||||
radius: 15,
|
radius: 15,
|
||||||
backgroundColor: Color(0xFFB81D2A),
|
backgroundColor: AppColors.accent,
|
||||||
child: Icon(Icons.close, color: Colors.white, size: 18),
|
child: Icon(Icons.close, color: Colors.white, size: 18),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -211,7 +211,7 @@ class _ChatPanelState extends State<ChatPanel> {
|
|||||||
padding: const EdgeInsets.all(16),
|
padding: const EdgeInsets.all(16),
|
||||||
margin: const EdgeInsets.symmetric(horizontal: 24),
|
margin: const EdgeInsets.symmetric(horizontal: 24),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: const Color(0xCC2A0710),
|
color: AppColors.lapisLo.withValues(alpha: 0.9),
|
||||||
borderRadius: BorderRadius.circular(14),
|
borderRadius: BorderRadius.circular(14),
|
||||||
border: Border.all(color: AppColors.gold, width: 1.5),
|
border: Border.all(color: AppColors.gold, width: 1.5),
|
||||||
),
|
),
|
||||||
@@ -270,7 +270,7 @@ class _ChatPanelState extends State<ChatPanel> {
|
|||||||
gradient: const LinearGradient(
|
gradient: const LinearGradient(
|
||||||
begin: Alignment.topCenter,
|
begin: Alignment.topCenter,
|
||||||
end: Alignment.bottomCenter,
|
end: Alignment.bottomCenter,
|
||||||
colors: [Color(0xFF9A1622), Color(0xFF5E0E16)],
|
colors: [AppColors.lapisHi, AppColors.lapisLo],
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(10),
|
borderRadius: BorderRadius.circular(10),
|
||||||
border: Border.all(color: AppColors.goldDark, width: 1.2),
|
border: Border.all(color: AppColors.goldDark, width: 1.2),
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ class _LobbyViewState extends State<_LobbyView> {
|
|||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
gradient: const RadialGradient(
|
gradient: const RadialGradient(
|
||||||
colors: [Color(0xFF1E7E3A), Color(0xFF0C5022)],
|
colors: [AppColors.lapisHi, AppColors.lapisLo],
|
||||||
radius: 0.9,
|
radius: 0.9,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(160),
|
borderRadius: BorderRadius.circular(160),
|
||||||
@@ -291,7 +291,7 @@ class _LobbyViewState extends State<_LobbyView> {
|
|||||||
gradient: const LinearGradient(
|
gradient: const LinearGradient(
|
||||||
begin: Alignment.topCenter,
|
begin: Alignment.topCenter,
|
||||||
end: Alignment.bottomCenter,
|
end: Alignment.bottomCenter,
|
||||||
colors: [Color(0xFF8E1B2A), Color(0xFF5A0E18)],
|
colors: [AppColors.lapisMid, AppColors.lapisLo],
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(10),
|
borderRadius: BorderRadius.circular(10),
|
||||||
border: Border.all(color: AppColors.gold, width: 1.5),
|
border: Border.all(color: AppColors.gold, width: 1.5),
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ class HokmGame extends FlameGame {
|
|||||||
HokmGame(this.cubit, {this.skin = 'simple'});
|
HokmGame(this.cubit, {this.skin = 'simple'});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Color backgroundColor() => const Color(0xFF0C3A1B);
|
Color backgroundColor() => AppColors.lapisNight;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<void> onLoad() async {
|
Future<void> onLoad() async {
|
||||||
|
|||||||
@@ -18,14 +18,14 @@ class Felt extends PositionComponent with HasGameReference {
|
|||||||
final w = game.size.x, h = game.size.y;
|
final w = game.size.x, h = game.size.y;
|
||||||
final center = Offset(w / 2, h / 2);
|
final center = Offset(w / 2, h / 2);
|
||||||
|
|
||||||
// ۱) زمینِ سبزِ نمدی (کلِ صفحه) با وینیتِ شعاعی برای عمق.
|
// ۱) زمینِ لاجوردیِ نمدی (کلِ صفحه) با وینیتِ شعاعی برای عمق.
|
||||||
canvas.drawRect(
|
canvas.drawRect(
|
||||||
Rect.fromLTWH(0, 0, w, h),
|
Rect.fromLTWH(0, 0, w, h),
|
||||||
Paint()
|
Paint()
|
||||||
..shader = RadialGradient(
|
..shader = RadialGradient(
|
||||||
center: Alignment.center,
|
center: Alignment.center,
|
||||||
radius: 1.0,
|
radius: 1.0,
|
||||||
colors: const [Color(0xFF1C7A3E), Color(0xFF0C3A1B)],
|
colors: const [AppColors.lapisHi, AppColors.lapisNight],
|
||||||
stops: const [0.5, 1.0],
|
stops: const [0.5, 1.0],
|
||||||
).createShader(Rect.fromLTWH(0, 0, w, h)),
|
).createShader(Rect.fromLTWH(0, 0, w, h)),
|
||||||
);
|
);
|
||||||
@@ -62,7 +62,7 @@ class Felt extends PositionComponent with HasGameReference {
|
|||||||
..shader = RadialGradient(
|
..shader = RadialGradient(
|
||||||
center: Alignment.center,
|
center: Alignment.center,
|
||||||
radius: 0.9,
|
radius: 0.9,
|
||||||
colors: const [Color(0xFF153A63), Color(0xFF07172E)],
|
colors: const [AppColors.lapisLo, AppColors.lapisInk],
|
||||||
stops: const [0.4, 1.0],
|
stops: const [0.4, 1.0],
|
||||||
).createShader(rect),
|
).createShader(rect),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -527,7 +527,7 @@ class _CardSkinArt extends StatelessWidget {
|
|||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(10),
|
borderRadius: BorderRadius.circular(10),
|
||||||
gradient: const RadialGradient(
|
gradient: const RadialGradient(
|
||||||
colors: [Color(0xFF12508F), Colors.black87],
|
colors: [AppColors.lapis, Colors.black87],
|
||||||
radius: 0.95,
|
radius: 0.95,
|
||||||
),
|
),
|
||||||
border: Border.all(
|
border: Border.all(
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ class _TopBar extends StatelessWidget {
|
|||||||
gradient: const LinearGradient(
|
gradient: const LinearGradient(
|
||||||
begin: Alignment.topCenter,
|
begin: Alignment.topCenter,
|
||||||
end: Alignment.bottomCenter,
|
end: Alignment.bottomCenter,
|
||||||
colors: [AppColors.bg, Color(0xFF1A0106)],
|
colors: [AppColors.bg, AppColors.bgDark],
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(16),
|
borderRadius: BorderRadius.circular(16),
|
||||||
border: Border.all(color: AppColors.goldDark),
|
border: Border.all(color: AppColors.goldDark),
|
||||||
|
|||||||
Reference in New Issue
Block a user