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.
- KeyEventManager, which infers the transit mode of the current platform and guides how key messages are dispatched.
- debugKeyEventSimulatorTransitModeOverride, overrides the transit mode used to simulate key events.
- KeySimulatorTransitModeVariant, an easier way to set debugKeyEventSimulatorTransitModeOverride in widget tests.
- 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.
- keyDataThenRawKeyData → const KeyDataTransitMode
Key event information is delivered as converted key data, followed by raw key data.
Raw key data is platform's native key event information sent in JSON through a method channel. It is interpreted by subclasses of RawKeyEventData.