window property

Window? get window

Gets window controlled by this WindowController.

Implementation

Window? get window => _window;
set window (Window? window)

Sets window.

Attempt to replace top-level window inside browser will cause StateError to be thrown.

Implementation

set window(Window? window) {
  if (isTopLevelWindowInsideBrowser) {
    throw StateError('Failed to mutate the main window inside a browser');
  }
  _window = window;
}