The most basic interface to the host operating system's user interface.
There is a single Window instance in the system, which you can obtain from the window property.
Properties
- defaultRouteName → String
-
The route or path that the operating system requested when the application was launched.
read-only - devicePixelRatio → double
-
The number of device pixels for each logical pixel. This number might not be a power of two. Indeed, it might not even be an integer. For example, the Nexus 6 has a device pixel ratio of 3.5.
read-only - locale → Locale
-
The system-reported locale.
read-only - onBeginFrame → FrameCallback
-
A callback that is invoked to notify the application that it is an appropriate time to provide a scene using the SceneBuilder API and the render method. When possible, this is driven by the hardware VSync signal. This is only called if scheduleFrame has been called since the last time this callback was invoked.
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, or padding values change.
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 - 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 - padding → WindowPadding
-
The number of physical pixels on each side of the display rectangle into which the application can render, but over which the operating system will likely place system UI (such as the Android system notification area), or which might be rendered outside of the physical display (e.g. overscan regions on television screens).
read-only - physicalSize → Size
-
The dimensions of the rectangle into which the application will be drawn, in physical pixels.
read-only - semanticsEnabled → bool
-
Whether the user has requested that
updateSemantics
be called when the semantic contents of window changes.read-only - hashCode → int
-
Get a hash code for this object.
read-only, inherited - runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Operators
-
operator ==(
other) → bool -
The equality operator.
inherited
Methods
-
render(
Scene scene) → void -
Updates the application's rendering on the GPU with the newly provided Scene. This function must be called within the scope of the onBeginFrame callback being invoked. If this function is called multiple times during a single onBeginFrame callback or called outside the scope of an onBeginFrame, the call will be ignored.
-
scheduleFrame(
) → void -
Requests that, at the next appropriate opportunity, the onBeginFrame callback be invoked.
-
sendPlatformMessage(
String name, ByteData data, PlatformMessageResponseCallback callback) → void -
Sends a message to a platform-specific plugin.
-
updateSemantics(
SemanticsUpdate update) → void -
Change the retained semantics data about this window.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited -
toString(
) → String -
Returns a string representation of this object.
inherited