@@ -22,15 +22,6 @@ void main() {
2222 setWindowMinSize (const Size (460 , 380 ));
2323 }
2424
25- // TODO: iOS support
26- SystemChrome .setSystemUIOverlayStyle (
27- const SystemUiOverlayStyle (
28- statusBarColor: Colors .transparent,
29- statusBarBrightness: Brightness .light,
30- statusBarIconBrightness: Brightness .dark,
31- ),
32- );
33-
3425 runApp (const ProviderScope (child: MainApp ()));
3526}
3627
@@ -42,28 +33,38 @@ class MainApp extends ConsumerWidget {
4233 final appColors = AppColors .light;
4334 final appTextStyles = AppTextStyles .light;
4435
45- return DevicePreview (
46- enabled: false ,
47- builder: (context) => MaterialApp .router (
48- debugShowCheckedModeBanner: true ,
49- locale: DevicePreview .locale (context),
50- builder: DevicePreview .appBuilder,
51- scrollBehavior: AppScrollBehavior (),
52- title: 'Куб.Расписание' ,
53- localizationsDelegates: const [
54- GlobalCupertinoLocalizations .delegate,
55- GlobalMaterialLocalizations .delegate,
56- ],
57- supportedLocales: const [
58- Locale ('ru' ),
59- Locale ('en' ),
60- ],
61- themeMode: ThemeMode .light,
62- theme: AppTheme .themeByStyles (
63- colors: appColors,
64- textStyles: appTextStyles,
36+ return AnnotatedRegion <SystemUiOverlayStyle >(
37+ value: SystemUiOverlayStyle (
38+ statusBarColor: Colors .transparent,
39+ statusBarBrightness: Brightness .light,
40+ statusBarIconBrightness: Brightness .dark,
41+ systemNavigationBarIconBrightness: Brightness .dark,
42+ systemNavigationBarColor: appColors.background,
43+ systemNavigationBarDividerColor: appColors.background,
44+ ),
45+ child: DevicePreview (
46+ enabled: false ,
47+ builder: (context) => MaterialApp .router (
48+ debugShowCheckedModeBanner: false ,
49+ locale: DevicePreview .locale (context),
50+ builder: DevicePreview .appBuilder,
51+ scrollBehavior: AppScrollBehavior (),
52+ title: 'Куб.Расписание' ,
53+ localizationsDelegates: const [
54+ GlobalCupertinoLocalizations .delegate,
55+ GlobalMaterialLocalizations .delegate,
56+ ],
57+ supportedLocales: const [
58+ Locale ('ru' ),
59+ Locale ('en' ),
60+ ],
61+ themeMode: ThemeMode .light,
62+ theme: AppTheme .themeByStyles (
63+ colors: appColors,
64+ textStyles: appTextStyles,
65+ ),
66+ routerConfig: ref.watch (routerProvider),
6567 ),
66- routerConfig: ref.watch (routerProvider),
6768 ),
6869 );
6970 }
0 commit comments