@@ -6,14 +6,11 @@ import 'package:flutter/material.dart';
66import 'package:flutter_bloc/flutter_bloc.dart' ;
77
88import 'mainmenu_model.dart' ;
9+ import 'package:dslideshow_flutter/features/theme/presentation/theme.dart' ;
910
1011class MainMenuWidget extends StatelessWidget {
1112 const MainMenuWidget ({super .key});
1213
13- // HUD Стиль
14- static const Color _kBorderColor = Colors .cyanAccent;
15- static const Color _kActiveBgColor = Color (0x3300E5FF ); // Полупрозрачный Cyan
16- static const Color _kBgColor = Color (0xE6000000 ); // 90% Black (Быстро рисуется)
1714
1815 @override
1916 Widget build (BuildContext context) {
@@ -35,14 +32,14 @@ class MainMenuWidget extends StatelessWidget {
3532 // 2. МЕНЮ (По центру экрана)
3633 Center (
3734 child: Container (
38- width: 400 ,
39- height: 400 , // Фиксированная высота или можно использовать Constraints
35+ width: ThemeSettings .menuSizeW ,
36+ height: ThemeSettings .menuSizeH , // Фиксированная высота или можно использовать Constraints
4037 decoration: BoxDecoration (
41- color: _kBgColor ,
42- border: Border .all (color: _kBorderColor. withAlpha (( 255.0 * 0.5 ). round () ), width: 1 ),
38+ color: ThemeColors .menuBgColor ,
39+ border: Border .all (color: ThemeColors .menuBorderColor. withOpacity ( 0.5 ), width: 1 ),
4340 // Убираем скругление для производительности и стиля "Терминал"
4441 boxShadow: [
45- BoxShadow (color: Colors .black. withAlpha (( 255.0 * 0.5 ). round ()) , blurRadius: 20 , spreadRadius: 5 )
42+ BoxShadow (color: ThemeColors .menuShadowColor , blurRadius: 20 , spreadRadius: 5 )
4643 ]
4744 ),
4845 child: Column (
@@ -51,31 +48,31 @@ class MainMenuWidget extends StatelessWidget {
5148 Container (
5249 width: double .infinity,
5350 padding: const EdgeInsets .symmetric (vertical: 8 , horizontal: 16 ),
54- color: _kBorderColor. withAlpha (( 255.0 * 0.1 ). round () ),
51+ color: ThemeColors .menuBorderColor. withOpacity ( 0.1 ),
5552 child: Row (
5653 mainAxisAlignment: MainAxisAlignment .spaceBetween,
5754 children: [
5855 const Text (
5956 "MENU" ,
6057 style: TextStyle (
61- color: _kBorderColor ,
62- fontSize: 24 ,
58+ color: ThemeColors .menuBorderColor ,
59+ fontSize: ThemeSettings .menuHeaderTitleSize ,
6360 fontWeight: FontWeight .bold,
6461 letterSpacing: 2.0 ,
6562 ),
6663 ),
6764 // Декоративные элементы
6865 Row (
6966 children: [
70- Container (width: 8 , height: 8 , color: _kBorderColor. withAlpha (( 255.0 * 0.5 ). round () )),
67+ Container (width: 8 , height: 8 , color: ThemeColors .menuBorderColor. withOpacity ( 0.5 )),
7168 const SizedBox (width: 4 ),
72- Container (width: 8 , height: 8 , color: _kBorderColor ),
69+ Container (width: 8 , height: 8 , color: ThemeColors .menuBorderColor ),
7370 ],
7471 )
7572 ],
7673 ),
7774 ),
78- const Divider (height: 1 , color: _kBorderColor ),
75+ Divider (height: 1 , color: ThemeColors .menuBorderColor ),
7976
8077 // Список
8178 Expanded (
@@ -99,7 +96,7 @@ class MainMenuWidget extends StatelessWidget {
9996 padding: const EdgeInsets .all (8 ),
10097 child: const Text (
10198 "Use physical buttons to navigate" ,
102- style: TextStyle (color: Colors .white24 , fontSize: 10 ),
99+ style: TextStyle (color: ThemeColors .menuSubTextColor , fontSize: ThemeSettings .menuHintTextSize ),
103100 ),
104101 )
105102 ],
@@ -113,29 +110,29 @@ class MainMenuWidget extends StatelessWidget {
113110 Widget _buildMenuItem (BuildContext context, Option item, bool isSelected) {
114111 return Container (
115112 margin: const EdgeInsets .only (bottom: 2 ),
116- color: isSelected ? _kActiveBgColor : Colors .transparent,
113+ color: isSelected ? ThemeColors .menuActiveBgColor : Colors .transparent,
117114 child: ListTile (
118115 dense: true ,
119116 contentPadding: const EdgeInsets .symmetric (horizontal: 16 , vertical: 0 ),
120117 // Иконка
121118 leading: Icon (
122119 item.icon.icon,
123- color: isSelected ? Colors .white : Colors .white38 ,
124- size: 20 ,
120+ color: isSelected ? ThemeColors .menuTextColor : ThemeColors .menuInactiveIconColor ,
121+ size: ThemeSettings .menuItemIconSize ,
125122 ),
126123 // Текст
127124 title: Text (
128125 item.title.toUpperCase (),
129126 style: TextStyle (
130- color: isSelected ? Colors .white : Colors .white70 ,
127+ color: isSelected ? ThemeColors .menuTextColor : ThemeColors .menuInactiveTextColor ,
131128 fontWeight: isSelected ? FontWeight .w900 : FontWeight .normal,
132- fontSize: 20 ,
129+ fontSize: ThemeSettings .menuListItemTextSize ,
133130 letterSpacing: 1.2 ,
134131 ),
135132 ),
136133 // Правая часть (стрелка)
137134 trailing: isSelected
138- ? const Icon (Icons .arrow_left, color: _kBorderColor)
135+ ? Icon (Icons .arrow_left, color: ThemeColors .menuBorderColor)
139136 : null ,
140137 onTap: () {
141138 context.read <MainMenuBloc >().add (MainMenuEvent .execute (item.command));
0 commit comments