KeyDataTransitMode enum

The mode in which information of key messages is delivered.

This enum is deprecated and will be removed. There is no direct substitute planned, since this enum will no longer be necessary once RawKeyEvent and associated APIs are removed.

Different platforms use different methods, classes, and models to inform the framework of native key events, which is called "transit mode".

The framework must determine which transit mode the current platform implements and behave accordingly (such as transforming and synthesizing events if necessary). Unit tests related to keyboard might also want to simulate platform of each transit mode.

The transit mode of the current platform is inferred by KeyEventManager at the start of the application.

See also:

Inheritance
Available extensions
Annotations
  • @Deprecated('No longer supported. Transit mode is always key data only. ' 'This feature was deprecated after v3.18.0-2.0.pre.')

Values

rawKeyData → const KeyDataTransitMode

Key event information is delivered as raw key data.

Raw key data is platform's native key event information sent in JSON through a method channel, which is then interpreted as a platform subclass of RawKeyEventData.

If the current transit mode is rawKeyData, the raw key data is converted to both KeyMessage.events and KeyMessage.rawEvent.

keyDataThenRawKeyData → const KeyDataTransitMode

Key event information is delivered as converted key data, followed by raw key data.

Key data (ui.KeyData) is a standardized event stream converted from platform's native key event information, sent through the embedder API. Its event model is described in HardwareKeyboard.

Raw key data is platform's native key event information sent in JSON through a method channel. It is interpreted by subclasses of RawKeyEventData.

If the current transit mode is keyDataThenRawKeyData, then the KeyEventManager will use the ui.KeyData for KeyMessage.events, and the raw data for KeyMessage.rawEvent.

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
name String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Constants

values → const List<KeyDataTransitMode>
A constant List of the values in this enum, in order of their declaration.