VirtualPlatformDispatcher class
Platform event dispatcher singleton.
The most basic interface to the host operating system's interface.
This is the central entry point for platform messages and configuration events from the platform.
It exposes the core scheduler API, the input event callback, the graphics drawing API, and other such core services.
It manages the list of the application's views as well as the
configuration of various platform attributes.
- Implemented types
Constructors
- VirtualPlatformDispatcher({required PlatformDispatcher platformDispatcher})
Properties
- accessibilityFeatures ↔ AccessibilityFeatures
-
Additional accessibility features that may be enabled by the platform.
getter/setter pairoverride-getter
- alwaysUse24HourFormat ↔ bool
-
The setting indicating whether time should always be shown in the 24-hour
format.
getter/setter pairoverride-getter
- brieflyShowPassword ↔ bool
-
Whether briefly displaying the characters as you type in obscured text
fields is enabled in system settings.
getter/setter pairoverride-getter
- defaultRouteName ↔ String
-
The route or path that the embedder requested when the application was
launched.
getter/setter pairoverride-getter
-
displays
→ Iterable<
VirtualDisplay> -
The current list of displays.
no setteroverride
- engineId → int?
-
Opaque engine identifier for the engine running current isolate. Can be used
in native code to retrieve the engine instance.
The identifier is valid while the isolate is running.
no setterinherited
- frameData → FrameData
-
The FrameData object for the current frame.
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- implicitView → VirtualFlutterView?
-
The FlutterView provided by the engine if the platform is unable to
create windows, or, for backwards compatibility.
no setteroverride
- initialLifecycleState ↔ String
-
The lifecycle state immediately after dart isolate initialization.
getter/setter pairoverride-getter
- letterSpacingOverride → double?
-
The system-suggested amount of additional space (in logical pixels)
to add between each letter.
no setterinherited
- lineHeightScaleFactorOverride → double?
-
The system-suggested height of the text, as a multiple of the font size.
no setterinherited
- locale ↔ Locale
-
The system-reported default locale of the device.
getter/setter pairoverride-getter
-
locales
↔ List<
Locale> -
The full system-reported supported locales of the device.
getter/setter pairoverride-getter
- nativeSpellCheckServiceDefined ↔ bool
-
Whether the spell check service is supported on the current platform.
getter/setter pairoverride-getter
- onAccessibilityFeaturesChanged ↔ VoidCallback?
-
A callback that is invoked when the value of accessibilityFeatures
changes.
getter/setter pairoverride
- onBeginFrame ↔ FrameCallback?
-
A callback invoked when any view begins a frame.
getter/setter pairoverride
- onDrawFrame ↔ VoidCallback?
-
A callback that is invoked for each frame after onBeginFrame has
completed and after the microtask queue has been drained.
getter/setter pairoverride
- onError ↔ ErrorCallback?
-
A callback that is invoked when an unhandled error occurs in the root
isolate.
getter/setter pairoverride
- onFrameDataChanged ↔ VoidCallback?
-
A callback that is invoked when the window updates the FrameData.
getter/setter pairoverride
- onKeyData ↔ KeyDataCallback?
-
A callback that is invoked when key data is available.
getter/setter pairoverride
- onLocaleChanged ↔ VoidCallback?
-
A callback that is invoked whenever locale changes value.
getter/setter pairoverride
- onMetricsChanged ↔ VoidCallback?
-
A callback that is invoked whenever the ViewConfiguration of any of the
views changes.
getter/setter pairoverride
- onPlatformBrightnessChanged ↔ VoidCallback?
-
A callback that is invoked whenever platformBrightness changes value.
getter/setter pairoverride
- onPlatformConfigurationChanged ↔ VoidCallback?
-
Called when the platform configuration changes.
getter/setter pairoverride
- onPlatformMessage ↔ PlatformMessageCallback?
-
Deprecated. Migrate to ChannelBuffers.setListener instead.
getter/setter pairoverride
- onPointerDataPacket ↔ PointerDataPacketCallback?
-
A callback that is invoked when pointer data is available.
getter/setter pairoverride
- onReportTimings ↔ TimingsCallback?
-
A callback that is invoked to report the FrameTiming of recently
rasterized frames.
getter/setter pairoverride
- onSemanticsActionEvent ↔ SemanticsActionEventCallback?
-
A callback that is invoked whenever the user requests an action to be
performed on a semantics node.
getter/setter pairoverride
- onSemanticsEnabledChanged ↔ VoidCallback?
-
A callback that is invoked when the value of semanticsEnabled changes.
getter/setter pairoverride
- onSystemFontFamilyChanged ↔ VoidCallback?
-
A callback that is invoked whenever systemFontFamily changes value.
getter/setter pairoverride
- onTextScaleFactorChanged ↔ VoidCallback?
-
A callback that is invoked whenever textScaleFactor changes value.
getter/setter pairoverride
- onViewFocusChange ↔ ViewFocusChangeCallback?
-
A callback invoked immediately after the focus is transitioned across FlutterViews.
getter/setter pairoverride
- paragraphSpacingOverride → double?
-
The system-suggested amount of additional space (in logical pixels)
to add following each paragraph in text.
no setterinherited
- parent → PlatformDispatcher
-
Real PlatformDispatcher.
final
- platformBrightness ↔ Brightness
-
The setting indicating the current brightness mode of the host platform.
If the platform has no preference, platformBrightness defaults to
Brightness.light.
getter/setter pairoverride-getter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- semanticsEnabled ↔ bool
-
Whether the user has requested that updateSemantics be called when the
semantic contents of a view changes.
getter/setter pairoverride-getter
- supportsShowingSystemContextMenu ↔ bool
-
Whether showing system context menu is supported on the current platform.
getter/setter pairoverride-getter
- systemFontFamily ↔ String?
-
The setting indicating the current system font of the host platform.
getter/setter pairoverride-getter
- textScaleFactor ↔ double
-
The system-reported text scale.
getter/setter pairoverride-getter
-
views
→ Iterable<
VirtualFlutterView> -
The current list of views, including top level platform windows used by
the application.
no setteroverride
- wordSpacingOverride → double?
-
The system-suggested amount of additional space (in logical pixels)
to add between each sequence of white-space (i.e. between each word).
no setterinherited
Methods
-
computePlatformResolvedLocale(
List< Locale> supportedLocales) → Locale? -
Performs the platform-native locale resolution.
override
-
getPersistentIsolateData(
) → ByteData? -
The embedder can specify data that the isolate can request synchronously
on launch. This accessor fetches that data.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerBackgroundIsolate(
RootIsolateToken token) → void -
Registers the current isolate with the isolate identified with by the
token. This is required if platform channels are to be used on a background isolate.override -
requestDartPerformanceMode(
DartPerformanceMode mode) → void -
Requests the Dart VM to adjusts the GC heuristics based on the requested
performance_mode.override -
requestViewFocusChange(
{required int viewId, required ViewFocusState state, required ViewFocusDirection direction}) → void -
Requests a focus change of the FlutterView with ID
viewId.override -
reset(
) → void - Reset all configuration to real device.
-
resetAccessibilityFeatures(
) → void - Reset configuration to real device feature.
-
resetAlwaysUse24Hour(
) → void - Reset configuration to real device feature.
-
resetBrieflyShowPassword(
) → void - Reset configuration to real device feature.
-
resetDefaultRouteName(
) → void - Reset configuration to real device feature.
-
resetInitialLifecycleState(
) → void - Reset configuration to real device initial state.
-
resetLocale(
) → void - Reset configuration to real device locale.
-
resetLocales(
) → void - Reset configuration to real device locales.
-
resetNativeSpellCheckServiceDefined(
) → void - Reset configuration to real device feature.
-
resetPlatformBrightness(
) → void - Reset configuration to real device platform brightness.
-
resetSemanticsEnabled(
) → void - Reset configuration to real device feature.
-
resetSupportsShowingSystemContextMenu(
) → void - Reset configuration to real device feature.
-
resetSystemFontFamily(
) → void -
resetTextScaleFactor(
) → void - Reset configuration to real device text scale factor.
-
scaleFontSize(
double unscaledFontSize) → double -
Computes the scaled font size from the given
unscaledFontSize, according to the user's platform preferences.override -
scheduleFrame(
) → void -
Requests that, at the next appropriate opportunity, the onBeginFrame and
onDrawFrame callbacks be invoked.
override
-
scheduleWarmUpFrame(
{required VoidCallback beginFrame, required VoidCallback drawFrame}) → void -
Schedule a frame to run as soon as possible, rather than waiting for the
engine to request a frame in response to a system "Vsync" signal.
override
-
sendPlatformMessage(
String name, ByteData? data, PlatformMessageResponseCallback? callback) → void -
Sends a message to a platform-specific plugin.
override
-
sendPortPlatformMessage(
String name, ByteData? data, int identifier, Object port) → void -
Sends a message to a platform-specific plugin via a SendPort.
override
-
setApplicationLocale(
Locale locale) → void -
Sets the locale for the application in engine.
inherited
-
setIsolateDebugName(
String name) → void -
Set the debug name associated with this platform dispatcher's root
isolate.
override
-
setSemanticsTreeEnabled(
bool enabled) → void -
Informs the engine whether the framework is generating a semantics tree.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
updateSemantics(
SemanticsUpdate update) → void -
Change the retained semantics data about this platform dispatcher.
override
-
view(
{required int id}) → FlutterView? -
Returns the FlutterView with the provided ID if one exists, or null
otherwise.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited