onKeyEvent method
Implementation
@override
bool onKeyEvent(KeyEvent event, Set<LogicalKeyboardKey> keysPressed) {
final isUp = event is KeyUpEvent;
final handlers = isUp ? _keyUp : _keyDown;
final handler = handlers[event.logicalKey];
if (handler != null) {
return handler(keysPressed);
}
return true;
}