KeyboardListenerComponent constructor

KeyboardListenerComponent({
  1. Map<LogicalKeyboardKey, KeyHandlerCallback> keyUp = const {},
  2. Map<LogicalKeyboardKey, KeyHandlerCallback> keyDown = const {},
})

A Component that receives keyboard input and executes registered methods. This component is based on KeyboardHandler, which requires the FlameGame which is used to be mixed with HasKeyboardHandlerComponents.

Implementation

KeyboardListenerComponent({
  Map<LogicalKeyboardKey, KeyHandlerCallback> keyUp = const {},
  Map<LogicalKeyboardKey, KeyHandlerCallback> keyDown = const {},
})  : _keyUp = keyUp,
      _keyDown = keyDown;