feat: cleaning code

This commit is contained in:
2026-06-24 22:56:32 +03:30
parent e73333344f
commit e8cde8e1f7
18 changed files with 99 additions and 88 deletions
@@ -171,7 +171,7 @@ class _GameScreenState extends State<GameScreen> {
padding: const EdgeInsets.symmetric(horizontal: 18, vertical: 8),
decoration: BoxDecoration(
gradient: const LinearGradient(
colors: [Color(0xFFE9B949), Color(0xFFB8860B)],
colors: [AppColors.gold, AppColors.goldDark],
),
borderRadius: BorderRadius.circular(20),
boxShadow: const [BoxShadow(color: Colors.black54, blurRadius: 8)],
@@ -179,7 +179,7 @@ class _GameScreenState extends State<GameScreen> {
child: const Text(
'نوبت شماست',
style: TextStyle(
color: Color(0xFF3A0A12),
color: AppColors.bg,
fontWeight: FontWeight.bold,
fontSize: 16,
),
@@ -328,7 +328,7 @@ class _GameScreenState extends State<GameScreen> {
child: Text(
'$_countdown',
style: const TextStyle(
color: Color(0xFF3A0A12),
color: AppColors.bg,
fontSize: 26,
fontWeight: FontWeight.bold,
),
@@ -398,8 +398,8 @@ class _GameScreenState extends State<GameScreen> {
Widget _trumpPicker(BuildContext context) {
const suits = [
('spades', '', 'پیک', Colors.white),
('hearts', '', 'دل', Color(0xFFD32F2F)),
('diamonds', '', 'خشت', Color(0xFFD32F2F)),
('hearts', '', 'دل', AppColors.suitRed),
('diamonds', '', 'خشت', AppColors.suitRed),
('clubs', '', 'گشنیز', Colors.white),
];
return Container(
@@ -448,7 +448,7 @@ class _GameScreenState extends State<GameScreen> {
],
),
const SizedBox(height: 16),
const Divider(color: Color(0x33E9B949), height: 1),
const Divider(color: AppColors.goldFaint, height: 1),
const SizedBox(height: 12),
// بُرِ مجدد با مصرفِ یک بلیت (۵ کارتِ تازه، سپس باز هم انتخابِ حکم).
BlocBuilder<WalletBloc, WalletBlocState>(
@@ -211,7 +211,7 @@ class _LobbyViewState extends State<_LobbyView> {
label: 'شروع بازی',
icon: Icons.play_arrow,
width: double.infinity,
colors: const [Color(0xFF3FA34D), Color(0xFF1B5E20)],
colors: const [AppColors.success, AppColors.successDark],
onTap: () => context.read<GameBloc>().startTable(_hands),
)
else
@@ -316,7 +316,7 @@ class _LobbyViewState extends State<_LobbyView> {
shape: BoxShape.circle,
gradient: selected
? const LinearGradient(
colors: [Color(0xFFE9B949), Color(0xFFB8860B)])
colors: [AppColors.gold, AppColors.goldDark])
: null,
color: selected ? null : AppColors.panel,
border: Border.all(
@@ -326,7 +326,7 @@ class _LobbyViewState extends State<_LobbyView> {
child: Text(
fa[h]!,
style: TextStyle(
color: selected ? const Color(0xFF3A0A12) : Colors.white,
color: selected ? AppColors.bg : Colors.white,
fontSize: 22,
fontWeight: FontWeight.bold,
),
@@ -89,7 +89,7 @@ class _TierCard extends StatelessWidget {
const _TierCard({required this.tier, required this.index});
static const _palettes = [
[Color(0xFF43A047), Color(0xFF1B5E20)],
[Color(0xFF43A047), AppColors.successDark],
[Color(0xFFE53935), Color(0xFF8E0E1B)],
[Color(0xFF1E88E5), Color(0xFF0D3C73)],
[Color(0xFF8E24AA), Color(0xFF4A0D5E)],