Avoid deprecated window property

This commit is contained in:
Ian VanSchooten 2024-08-28 15:28:17 -04:00
parent 188a8f8e4b
commit 98a0818db2
2 changed files with 2 additions and 2 deletions

View File

@ -32,7 +32,7 @@ class App extends StatefulWidget {
class _AppState extends State<App> {
final settings = Settings();
Brightness brightness = SchedulerBinding.instance.window.platformBrightness;
Brightness brightness = SchedulerBinding.instance.platformDispatcher.platformBrightness;
StreamController dnEnrolled = StreamController.broadcast();
@override

View File

@ -22,7 +22,7 @@ class Settings {
}
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) {