Skip to content

Commit

Permalink
Eliminate more window singleton usages (flutter#145560)
Browse files Browse the repository at this point in the history
These usages in strings slipped through the initial clean-up.
  • Loading branch information
goderbauer committed Mar 21, 2024
1 parent 31209d0 commit eaf509a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions dev/integration_tests/ios_host_app/flutterapp/lib/main
Expand Up @@ -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<String> 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
Expand Down
Expand Up @@ -359,7 +359,7 @@ void main() {
SchedulerBinding.instance!.addTimingsCallback((List<FrameTiming> timings) {
throw 'TimingsCallback';
});
ui.window.onReportTimings!(<FrameTiming>[]);
ui.PlatformDispatcher.instance.onReportTimings!(<FrameTiming>[]);
'''
);

Expand Down

0 comments on commit eaf509a

Please sign in to comment.