@@ -234,35 +234,32 @@ class _ThunderAppState extends State<ThunderApp> {
234
234
theme = theme.copyWith (pageTransitionsTheme: pageTransitionsTheme);
235
235
darkTheme = darkTheme.copyWith (pageTransitionsTheme: pageTransitionsTheme);
236
236
237
- // Set navigation bar color on Android to be transparent
238
- SystemChrome .setSystemUIOverlayStyle (
239
- SystemUiOverlayStyle (
240
- systemNavigationBarColor: Colors .black.withOpacity (0.0001 ),
241
- ),
242
- );
243
-
244
237
Locale ? locale = AppLocalizations .supportedLocales.where ((Locale locale) => locale.languageCode == thunderBloc.state.appLanguageCode).firstOrNull;
245
238
246
239
return OverlaySupport .global (
247
- child: MaterialApp .router (
248
- title: 'Thunder' ,
249
- locale: locale,
250
- localizationsDelegates: const [
251
- ...AppLocalizations .localizationsDelegates,
252
- MaterialLocalizationsEo .delegate,
253
- CupertinoLocalizationsEo .delegate,
254
- ],
255
- supportedLocales: const [
256
- ...AppLocalizations .supportedLocales,
257
- Locale ('eo' ), // Additional locale which is not officially supported: Esperanto
258
- ],
259
- routerConfig: router,
260
- themeMode: state.themeType == ThemeType .system ? ThemeMode .system : (state.themeType == ThemeType .light ? ThemeMode .light : ThemeMode .dark),
261
- theme: theme,
262
- darkTheme: darkTheme,
263
- debugShowCheckedModeBanner: false ,
264
- scaffoldMessengerKey: GlobalContext .scaffoldMessengerKey,
265
- scrollBehavior: (state.reduceAnimations && Platform .isAndroid) ? const ScrollBehavior ().copyWith (overscroll: false ) : null ,
240
+ child: AnnotatedRegion <SystemUiOverlayStyle >(
241
+ // Set navigation bar color on Android to be transparent
242
+ value: FlexColorScheme .themedSystemNavigationBar (context, systemNavBarStyle: FlexSystemNavBarStyle .transparent),
243
+ child: MaterialApp .router (
244
+ title: 'Thunder' ,
245
+ locale: locale,
246
+ localizationsDelegates: const [
247
+ ...AppLocalizations .localizationsDelegates,
248
+ MaterialLocalizationsEo .delegate,
249
+ CupertinoLocalizationsEo .delegate,
250
+ ],
251
+ supportedLocales: const [
252
+ ...AppLocalizations .supportedLocales,
253
+ Locale ('eo' ), // Additional locale which is not officially supported: Esperanto
254
+ ],
255
+ routerConfig: router,
256
+ themeMode: state.themeType == ThemeType .system ? ThemeMode .system : (state.themeType == ThemeType .light ? ThemeMode .light : ThemeMode .dark),
257
+ theme: theme,
258
+ darkTheme: darkTheme,
259
+ debugShowCheckedModeBanner: false ,
260
+ scaffoldMessengerKey: GlobalContext .scaffoldMessengerKey,
261
+ scrollBehavior: (state.reduceAnimations && Platform .isAndroid) ? const ScrollBehavior ().copyWith (overscroll: false ) : null ,
262
+ ),
266
263
),
267
264
);
268
265
},
0 commit comments