KeyboardListenerComponent constructor
KeyboardListenerComponent({
- Map<
LogicalKeyboardKey, KeyHandlerCallback> keyUp = const {}, - Map<
LogicalKeyboardKey, KeyHandlerCallback> keyDown = const {}, - ComponentKey? key,
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 {},
super.key,
}) : _keyUp = keyUp,
_keyDown = keyDown;