Fix navigation bar icon color

This commit is contained in:
Ming Ming 2023-08-05 03:47:09 +08:00
parent ad5146607a
commit b403609f07
2 changed files with 12 additions and 0 deletions

View file

@ -241,3 +241,14 @@ ThemeData _applyColorScheme(ColorScheme colorScheme) {
], ],
); );
} }
extension BrightnessExtension on Brightness {
Brightness invert() {
switch (this) {
case Brightness.dark:
return Brightness.light;
case Brightness.light:
return Brightness.dark;
}
}
}

View file

@ -619,6 +619,7 @@ class _ThemedMyApp extends StatelessWidget {
value: SystemUiOverlayStyle( value: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, statusBarColor: Colors.transparent,
systemNavigationBarColor: theme.colorScheme.secondaryContainer, systemNavigationBarColor: theme.colorScheme.secondaryContainer,
systemNavigationBarIconBrightness: theme.brightness.invert(),
), ),
child: child, child: child,
); );