simulateKeyRepeatEvent function Null safety
- LogicalKeyboardKey key,
- {String? platform,
- PhysicalKeyboardKey? physicalKey,
- String? character}
Simulates sending a hardware key repeat event through the system channel.
This only simulates key presses coming from a physical keyboard, not from a soft keyboard.
Specify platform
as one of the platforms allowed in
Platform.operatingSystem to make the event appear to be from that type of
system. Defaults to the operating system that the test is running on. Some
platforms (e.g. Windows, iOS) are not yet supported.
Returns true if the key event was handled by the framework.
See also:
- simulateKeyDownEvent and simulateKeyUpEvent to simulate the corresponding key down and up event.
Implementation
Future<bool> simulateKeyRepeatEvent(
LogicalKeyboardKey key, {
String? platform,
PhysicalKeyboardKey? physicalKey,
String? character,
}) {
return KeyEventSimulator.simulateKeyRepeatEvent(key, platform: platform, physicalKey: physicalKey, character: character);
}