Skip to content

Commit

Permalink
Fix status bar color
Browse files Browse the repository at this point in the history
  • Loading branch information
micahmo committed Nov 27, 2024
1 parent d8bb721 commit fa4375b
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,15 @@ class _ThunderAppState extends State<ThunderApp> {

return OverlaySupport.global(
child: AnnotatedRegion<SystemUiOverlayStyle>(
// Set navigation bar color on Android to be transparent
value: FlexColorScheme.themedSystemNavigationBar(context, systemNavBarStyle: FlexSystemNavBarStyle.transparent),
// For Android, set the navigation bar to be transparent and the status bar to match the app surface color
value: SystemUiOverlayStyle(
systemNavigationBarColor: Colors.transparent,
statusBarColor: state.themeType == ThemeType.system
? WidgetsBinding.instance.platformDispatcher.platformBrightness == Brightness.dark
? darkTheme.colorScheme.surface
: theme.colorScheme.surface
: (state.themeType == ThemeType.dark ? darkTheme.colorScheme.surface : theme.colorScheme.surface),
),
child: MaterialApp.router(
title: 'Thunder',
locale: locale,
Expand Down

0 comments on commit fa4375b

Please sign in to comment.