KeyDataTransitMode enum Null safety

The mode in which information of key messages is delivered.

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

Constructors

KeyDataTransitMode()
const

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.

KeyDataTransitMode()
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 rawKeyData, the key data is converted to KeyMessage.events, and the raw key data is converted to KeyMessage.rawEvent.

KeyDataTransitMode()

Properties

hashCode int
The hash code for this object.
read-onlyinherited
index int
A numeric identifier for the enumerated value.
read-onlyinherited
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent 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.
[rawKeyData, keyDataThenRawKeyData]