mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-11-12 08:53:57 +01:00
Update Theme Setup (#2300)
* refactor(theme-setup-update): Move didChangePlatformBrightness lifecycle method to Root widget instead of AppState. We already have an active WidgetsBindingObserver in Root widget. * fix(theme): Add workaround for flutter iOS didChangePlatformBrightness issue causing unneeded rebuilds.
This commit is contained in:
@@ -168,7 +168,7 @@ abstract class ThemeStoreBase with Store {
|
||||
}
|
||||
|
||||
MaterialThemeBase getThemeFromSystem() {
|
||||
final systemBrightness = WidgetsBinding.instance.window.platformBrightness;
|
||||
final systemBrightness = WidgetsBinding.instance.platformDispatcher.platformBrightness;
|
||||
return systemBrightness == Brightness.dark ? ThemeList.darkTheme : ThemeList.lightTheme;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user