onKeyEvent method
Implementation
@override
@mustCallSuper
KeyEventResult onKeyEvent(
KeyEvent event,
Set<LogicalKeyboardKey> keysPressed,
) {
final blockedPropagation = !propagateToChildren<KeyboardHandler>(
(KeyboardHandler child) => child.onKeyEvent(event, keysPressed),
);
// If any component received the event, return handled,
// otherwise, ignore it.
if (blockedPropagation) {
return KeyEventResult.handled;
}
return KeyEventResult.ignored;
}