Skip to content

Commit

Permalink
fix: navigation bar color (#197)
Browse files Browse the repository at this point in the history
  • Loading branch information
cameralis authored Sep 18, 2022
1 parent 9c5b0b9 commit 110c332
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
4 changes: 2 additions & 2 deletions lib/ui/views/navigation/navigation_viewmodel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ class NavigationViewModel extends IndexTrackingViewModel {
await prefs.setBool('useDarkTheme', isDark);
await DynamicTheme.of(context)!.setTheme(isDark ? 1 : 0);
}
SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge);
SystemChrome.setSystemUIOverlayStyle(
SystemUiOverlayStyle(
systemNavigationBarColor:
DynamicTheme.of(context)!.theme.colorScheme.surface,
systemNavigationBarColor: Colors.transparent,
systemNavigationBarIconBrightness:
DynamicTheme.of(context)!.theme.brightness == Brightness.light
? Brightness.dark
Expand Down
8 changes: 0 additions & 8 deletions lib/ui/views/settings/settings_viewmodel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,6 @@ class SettingsViewModel extends BaseViewModel {
} else {
await DynamicTheme.of(context)!.setTheme(value ? 3 : 1);
}
SystemChrome.setSystemUIOverlayStyle(
SystemUiOverlayStyle(
systemNavigationBarColor:
DynamicTheme.of(context)!.theme.colorScheme.surface,
),
);
notifyListeners();
}

Expand All @@ -79,8 +73,6 @@ class SettingsViewModel extends BaseViewModel {
}
SystemChrome.setSystemUIOverlayStyle(
SystemUiOverlayStyle(
systemNavigationBarColor:
DynamicTheme.of(context)!.theme.colorScheme.surface,
systemNavigationBarIconBrightness:
value ? Brightness.light : Brightness.dark,
),
Expand Down

0 comments on commit 110c332

Please sign in to comment.