mainWindow property

FlutterView get mainWindow

Flutter application's main window.

Implementation

ui.FlutterView get mainWindow {
  if (_window == null) {
    if (context == null) {
      _window = WidgetsBinding.instance.platformDispatcher.views.first;
    } else {
      _window = View.of(context!);
    }
  }
  return _window!;
}