Unverified Commit eaf509aa authored by Michael Goderbauer's avatar Michael Goderbauer Committed by GitHub

Eliminate more window singleton usages (#145560)

These usages in strings slipped through the initial clean-up.
parent 31209d04
...@@ -36,12 +36,12 @@ void main() { ...@@ -36,12 +36,12 @@ void main() {
// will be made to let us know when we should be changing the app state. // will be made to let us know when we should be changing the app state.
_kReloadChannel.setMessageHandler(run); _kReloadChannel.setMessageHandler(run);
// Start off with whatever the initial route is supposed to be. // Start off with whatever the initial route is supposed to be.
run(ui.window.defaultRouteName); run(ui.PlatformDispatcher.instance.defaultRouteName);
} }
Future<String> run(String? name) async { Future<String> run(String? name) async {
// The platform-specific component will call [setInitialRoute] on the Flutter // The platform-specific component will call [setInitialRoute] on the Flutter
// view (or view controller for iOS) to set [ui.window.defaultRouteName]. // view (or view controller for iOS) to set [ui.PlatformDispatcher.defaultRouteName].
// We then dispatch based on the route names to show different Flutter // We then dispatch based on the route names to show different Flutter
// widgets. // widgets.
// Since we don't really care about Flutter-side navigation in this app, we're // Since we don't really care about Flutter-side navigation in this app, we're
......
...@@ -359,7 +359,7 @@ void main() { ...@@ -359,7 +359,7 @@ void main() {
SchedulerBinding.instance!.addTimingsCallback((List<FrameTiming> timings) { SchedulerBinding.instance!.addTimingsCallback((List<FrameTiming> timings) {
throw 'TimingsCallback'; throw 'TimingsCallback';
}); });
ui.window.onReportTimings!(<FrameTiming>[]); ui.PlatformDispatcher.instance.onReportTimings!(<FrameTiming>[]);
''' '''
); );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment