implicitView property
The FlutterView provided by the engine if the platform is unable to create windows, or, for backwards compatibility.
If the platform provides an implicit view, it can be used to bootstrap the framework. This is common for platforms designed for single-view applications like mobile devices with a single display.
Applications and libraries must not rely on this property being set as it may be null depending on the engine's configuration. Instead, consider using View.of to lookup the FlutterView the current BuildContext is drawing into.
While the properties on the referenced FlutterView may change, the reference itself is guaranteed to never change over the lifetime of the application: if this property is null at startup, it will remain so throughout the entire lifetime of the application. If it points to a specific FlutterView, it will continue to point to the same view until the application is shut down (although the engine may replace or remove the underlying backing surface of the view at its discretion).
See also:
- View.of, for accessing the current view.
- PlatformDispatcher.views for a list of all FlutterViews provided by the platform.
Implementation
@override
TestFlutterView? get implicitView {
return _platformDispatcher.implicitView != null
? _testViews[_platformDispatcher.implicitView!.viewId]!
: null;
}