forked from firka/student-legacy
maybe fixed dark mode bug
This commit is contained in:
parent
95fa819ed2
commit
7adec7dfa5
@ -171,9 +171,9 @@ class NavigationScreenState extends State<NavigationScreen>
|
||||
}
|
||||
|
||||
@override
|
||||
void didChangePlatformBrightness() {
|
||||
void PlatformBrightness() {
|
||||
if (settings.theme == ThemeMode.system) {
|
||||
Brightness? brightness = MediaQuery.of(context).platformBrightness;
|
||||
Brightness? brightness = WidgetsBinding.instance.window.platformBrightness;
|
||||
Provider.of<ThemeModeObserver>(context, listen: false).changeTheme(
|
||||
brightness == Brightness.light ? ThemeMode.light : ThemeMode.dark);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user