onKeyEvent method
Implementation
KeyEventResult onKeyEvent(
KeyEvent event,
Set<LogicalKeyboardKey> keysPressed,
) {
assert(
this is! HasKeyboardHandlerComponents,
'A keyboard event was registered by KeyboardEvents for a game also '
'mixed with HasKeyboardHandlerComponents. Do not mix with both, '
'HasKeyboardHandlerComponents removes the necessity of KeyboardEvents',
);
return KeyEventResult.handled;
}