mirror of
https://github.com/ReVanced/revanced-manager.git
synced 2026-01-29 05:41:04 +00:00
refactor: migrate MediaQuery properties to InheritedModel (#1115)
Co-authored-by: Ushie <ushiekane@gmail.com>
This commit is contained in:
@@ -33,7 +33,7 @@ class NavigationViewModel extends IndexTrackingViewModel {
|
||||
|
||||
if (prefs.getBool('useDarkTheme') == null) {
|
||||
final bool isDark =
|
||||
MediaQuery.of(context).platformBrightness != Brightness.light;
|
||||
MediaQuery.platformBrightnessOf(context) != Brightness.light;
|
||||
await prefs.setBool('useDarkTheme', isDark);
|
||||
await DynamicTheme.of(context)!.setTheme(isDark ? 1 : 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user