Skip to content

Commit eaf509a

Browse files
authored
Eliminate more window singleton usages (#145560)
These usages in strings slipped through the initial clean-up.
1 parent 31209d0 commit eaf509a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

dev/integration_tests/ios_host_app/flutterapp/lib/main

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ void main() {
3636
// will be made to let us know when we should be changing the app state.
3737
_kReloadChannel.setMessageHandler(run);
3838
// Start off with whatever the initial route is supposed to be.
39-
run(ui.window.defaultRouteName);
39+
run(ui.PlatformDispatcher.instance.defaultRouteName);
4040
}
4141

4242
Future<String> run(String? name) async {
4343
// The platform-specific component will call [setInitialRoute] on the Flutter
44-
// view (or view controller for iOS) to set [ui.window.defaultRouteName].
44+
// view (or view controller for iOS) to set [ui.PlatformDispatcher.defaultRouteName].
4545
// We then dispatch based on the route names to show different Flutter
4646
// widgets.
4747
// Since we don't really care about Flutter-side navigation in this app, we're

packages/flutter_tools/test/integration.shard/break_on_framework_exceptions_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ void main() {
359359
SchedulerBinding.instance!.addTimingsCallback((List<FrameTiming> timings) {
360360
throw 'TimingsCallback';
361361
});
362-
ui.window.onReportTimings!(<FrameTiming>[]);
362+
ui.PlatformDispatcher.instance.onReportTimings!(<FrameTiming>[]);
363363
'''
364364
);
365365

0 commit comments

Comments
 (0)