@@ -148,6 +148,21 @@ class EnginePlatformDispatcher extends ui.PlatformDispatcher {
148
148
final Map <Object , ui.ViewConfiguration > _windowConfigurations =
149
149
< Object , ui.ViewConfiguration > {};
150
150
151
+ /// The implicit [FlutterView] provided by the platform, if any.
152
+ ///
153
+ /// This is used to bootstrap the framework for applications where the
154
+ /// platform provides a view, such as applications designed for
155
+ /// single-display mobile devices.
156
+ ///
157
+ /// While the [FlutterView] 's properties may change, this reference is
158
+ /// guaranteed to never change.
159
+ ///
160
+ /// See also:
161
+ ///
162
+ /// * [View.of] , for accessing the current view.
163
+ @override
164
+ ui.FlutterView ? get implicitView => viewData[kImplicitViewId];
165
+
151
166
/// A callback that is invoked whenever the platform's [devicePixelRatio] ,
152
167
/// [physicalSize] , [padding] , [viewInsets] , or [systemGestureInsets]
153
168
/// values change, for example when the device is rotated or when the
@@ -479,7 +494,7 @@ class EnginePlatformDispatcher extends ui.PlatformDispatcher {
479
494
// TODO(a-wallen): As multi-window support expands, the pop call
480
495
// will need to include the view ID. Right now only one view is
481
496
// supported.
482
- (viewData[kSingletonViewId ]! as EngineFlutterWindow )
497
+ (viewData[kImplicitViewId ]! as EngineFlutterWindow )
483
498
.browserHistory
484
499
.exit ()
485
500
.then ((_) {
@@ -584,7 +599,7 @@ class EnginePlatformDispatcher extends ui.PlatformDispatcher {
584
599
// TODO(a-wallen): As multi-window support expands, the navigation call
585
600
// will need to include the view ID. Right now only one view is
586
601
// supported.
587
- (viewData[kSingletonViewId ]! as EngineFlutterWindow )
602
+ (viewData[kImplicitViewId ]! as EngineFlutterWindow )
588
603
.handleNavigationMessage (data)
589
604
.then ((bool handled) {
590
605
if (handled) {
@@ -1173,7 +1188,7 @@ class EnginePlatformDispatcher extends ui.PlatformDispatcher {
1173
1188
@override
1174
1189
String get defaultRouteName {
1175
1190
return _defaultRouteName ?? =
1176
- (viewData[kSingletonViewId ]! as EngineFlutterWindow ).browserHistory.currentPath;
1191
+ (viewData[kImplicitViewId ]! as EngineFlutterWindow ).browserHistory.currentPath;
1177
1192
}
1178
1193
1179
1194
/// Lazily initialized when the `defaultRouteName` getter is invoked.
0 commit comments