Avoid deprecated window property
This commit is contained in:
parent
188a8f8e4b
commit
98a0818db2
|
@ -32,7 +32,7 @@ class App extends StatefulWidget {
|
||||||
|
|
||||||
class _AppState extends State<App> {
|
class _AppState extends State<App> {
|
||||||
final settings = Settings();
|
final settings = Settings();
|
||||||
Brightness brightness = SchedulerBinding.instance.window.platformBrightness;
|
Brightness brightness = SchedulerBinding.instance.platformDispatcher.platformBrightness;
|
||||||
StreamController dnEnrolled = StreamController.broadcast();
|
StreamController dnEnrolled = StreamController.broadcast();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
|
@ -22,7 +22,7 @@ class Settings {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool get darkMode {
|
bool get darkMode {
|
||||||
return _getBool('darkMode', SchedulerBinding.instance.window.platformBrightness == Brightness.dark);
|
return _getBool('darkMode', SchedulerBinding.instance.platformDispatcher.platformBrightness == Brightness.dark);
|
||||||
}
|
}
|
||||||
|
|
||||||
set darkMode(bool enabled) {
|
set darkMode(bool enabled) {
|
||||||
|
|
Loading…
Reference in New Issue