SingletonFlutterWindow class Null safety

A FlutterWindow that includes access to setting callbacks and retrieving properties that reside on the PlatformDispatcher.

It is the type of the global window singleton used by applications that only have a single main window.

In addition to the properties of FlutterView, this class provides access to platform-specific properties. To modify or retrieve these properties, applications designed for more than one main window should prefer using WidgetsBinding.instance.platformDispatcher instead.

Prefer access through WidgetsBinding.instance.window or WidgetsBinding.instance.platformDispatcher over a static reference to window, or PlatformDispatcher.instance. See the documentation for PlatformDispatcher.instance for more details about this recommendation.

Inheritance
Implementers

Properties

accessibilityFeatures AccessibilityFeatures
Additional accessibility features that may be enabled by the platform.
read-only
alwaysUse24HourFormat bool
The setting indicating whether time should always be shown in the 24-hour format. [...]
read-only
defaultRouteName String
The route or path that the embedder requested when the application was launched. [...]
read-only
devicePixelRatio double
The number of device pixels for each logical pixel for the screen this view is displayed on. [...]
read-only, inherited
frameData FrameData
The FrameData object for the current frame.
read-only
hashCode int
The hash code for this object. [...]
read-only, inherited
initialLifecycleState String
The lifecycle state immediately after dart isolate initialization. [...]
read-only
locale Locale
The system-reported default locale of the device. [...]
read-only
locales List<Locale>
The full system-reported supported locales of the device. [...]
read-only
onAccessibilityFeaturesChanged VoidCallback?
A callback that is invoked when the value of accessibilityFeatures changes. [...]
read / write
onBeginFrame FrameCallback?
A callback that is invoked to notify the window that it is an appropriate time to provide a scene using the SceneBuilder API and the render method. [...]
read / write
onDrawFrame VoidCallback?
A callback that is invoked for each frame after onBeginFrame has completed and after the microtask queue has been drained. [...]
read / write
onFrameDataChanged VoidCallback?
A callback that is invoked when the window updates the FrameData.
read / write
onKeyData KeyDataCallback?
A callback that is invoked when key data is available. [...]
read / write
onLocaleChanged VoidCallback?
A callback that is invoked whenever locale changes value. [...]
read / write
onMetricsChanged VoidCallback?
A callback that is invoked whenever the devicePixelRatio, physicalSize, padding, viewInsets, PlatformDispatcher.views, or systemGestureInsets values change. [...]
read / write
onPlatformBrightnessChanged VoidCallback?
A callback that is invoked whenever platformBrightness changes value. [...]
read / write
onPlatformMessage PlatformMessageCallback?
Called whenever this window receives a message from a platform-specific plugin. [...]
read / write
onPointerDataPacket PointerDataPacketCallback?
A callback that is invoked when pointer data is available. [...]
read / write
onReportTimings TimingsCallback?
A callback that is invoked to report the FrameTiming of recently rasterized frames. [...]
read / write
onSemanticsAction SemanticsActionCallback?
A callback that is invoked whenever the user requests an action to be performed. [...]
read / write
onSemanticsEnabledChanged VoidCallback?
A callback that is invoked when the value of semanticsEnabled changes. [...]
read / write
onTextScaleFactorChanged VoidCallback?
A callback that is invoked whenever textScaleFactor changes value. [...]
read / write
padding WindowPadding
The number of physical pixels on each side of the display rectangle into which the view can render, but which may be partially obscured by system UI (such as the system notification area), or or physical intrusions in the display (e.g. overscan regions on television screens or phone sensor housings). [...]
read-only, inherited
physicalGeometry Rect
The dimensions and location of the rectangle into which the scene rendered in this view will be drawn on the screen, in physical pixels. [...]
read-only, inherited
physicalSize Size
The dimensions of the rectangle into which the scene rendered in this view will be drawn on the screen, in physical pixels. [...]
read-only, inherited
platformBrightness Brightness
The setting indicating the current brightness mode of the host platform. [...]
read-only
platformDispatcher PlatformDispatcher
The platform dispatcher that this view is registered with, and gets its information from.
final, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
semanticsEnabled bool
Whether the user has requested that updateSemantics be called when the semantic contents of window changes. [...]
read-only
systemGestureInsets WindowPadding
The number of physical pixels on each side of the display rectangle into which the view can render, but where the operating system will consume input gestures for the sake of system navigation. [...]
read-only, inherited
textScaleFactor double
The system-reported text scale. [...]
read-only
viewConfiguration ViewConfiguration
The configuration of this view.
read-only, inherited
viewInsets WindowPadding
The number of physical pixels on each side of the display rectangle into which the view can render, but over which the operating system will likely place system UI, such as the keyboard, that fully obscures any content. [...]
read-only, inherited
viewPadding WindowPadding
The number of physical pixels on each side of the display rectangle into which the view can render, but which may be partially obscured by system UI (such as the system notification area), or or physical intrusions in the display (e.g. overscan regions on television screens or phone sensor housings). [...]
read-only, inherited

Methods

computePlatformResolvedLocale(List<Locale> supportedLocales) Locale?
Performs the platform-native locale resolution. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
render(Scene scene) → void
Updates the view's rendering on the GPU with the newly provided Scene. [...]
inherited
scheduleFrame() → void
Requests that, at the next appropriate opportunity, the onBeginFrame and onDrawFrame callbacks be invoked. [...]
sendPlatformMessage(String name, ByteData? data, PlatformMessageResponseCallback? callback) → void
Sends a message to a platform-specific plugin. [...]
setIsolateDebugName(String name) → void
Set the debug name associated with this platform dispatcher's root isolate. [...]
toString() String
A string representation of this object. [...]
inherited
updateSemantics(SemanticsUpdate update) → void
Change the retained semantics data about this window. [...]

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited