handleKeyEvent method
Handle keyboard input
Implementation
KeyEventResult handleKeyEvent(KeyEvent event) {
if (event is! KeyDownEvent) return KeyEventResult.ignored;
if (event.logicalKey == acceptKey && isVisible) {
return KeyEventResult.handled;
}
if (event.logicalKey == partialAcceptKey && isVisible) {
return KeyEventResult.handled;
}
if (event.logicalKey == dismissKey && isVisible) {
hide();
return KeyEventResult.handled;
}
return KeyEventResult.ignored;
}