sendKeyUpEvent method Null safety

Future<bool> sendKeyUpEvent(
  1. LogicalKeyboardKey key,
  2. {String platform = _defaultPlatform}
)

Simulates sending a physical key up event through the system channel.

This only simulates key up events coming from a physical keyboard, not from a soft keyboard.

Specify platform as one of the platforms allowed in platform.Platform.operatingSystem to make the event appear to be from that type of system. Defaults to "web" on web, and "android" everywhere else. May not be null.

Whether the event is sent through RawKeyEvent or KeyEvent is controlled by debugKeyEventSimulatorTransitModeOverride.

Returns true if the key event was handled by the framework.

See also:

Implementation

Future<bool> sendKeyUpEvent(LogicalKeyboardKey key, { String platform = _defaultPlatform }) async {
  assert(platform != null);
  // Internally wrapped in async guard.
  return simulateKeyUpEvent(key, platform: platform);
}