From eaf509aaf8d28546b846bcc79008a39a11365e71 Mon Sep 17 00:00:00 2001 From: Michael Goderbauer Date: Thu, 21 Mar 2024 13:59:25 -0700 Subject: [PATCH] Eliminate more window singleton usages (#145560) These usages in strings slipped through the initial clean-up. --- dev/integration_tests/ios_host_app/flutterapp/lib/main | 4 ++-- .../integration.shard/break_on_framework_exceptions_test.dart | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dev/integration_tests/ios_host_app/flutterapp/lib/main b/dev/integration_tests/ios_host_app/flutterapp/lib/main index 78ea99b18b..ec78451126 100644 --- a/dev/integration_tests/ios_host_app/flutterapp/lib/main +++ b/dev/integration_tests/ios_host_app/flutterapp/lib/main @@ -36,12 +36,12 @@ void main() { // will be made to let us know when we should be changing the app state. _kReloadChannel.setMessageHandler(run); // Start off with whatever the initial route is supposed to be. - run(ui.window.defaultRouteName); + run(ui.PlatformDispatcher.instance.defaultRouteName); } Future run(String? name) async { // 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 // widgets. // Since we don't really care about Flutter-side navigation in this app, we're diff --git a/packages/flutter_tools/test/integration.shard/break_on_framework_exceptions_test.dart b/packages/flutter_tools/test/integration.shard/break_on_framework_exceptions_test.dart index 6e592c48d3..94672c2818 100644 --- a/packages/flutter_tools/test/integration.shard/break_on_framework_exceptions_test.dart +++ b/packages/flutter_tools/test/integration.shard/break_on_framework_exceptions_test.dart @@ -359,7 +359,7 @@ void main() { SchedulerBinding.instance!.addTimingsCallback((List timings) { throw 'TimingsCallback'; }); - ui.window.onReportTimings!([]); + ui.PlatformDispatcher.instance.onReportTimings!([]); ''' );