handlingInput property
bool
get
handlingInput
Whether or not the UI is listening for keyboard events.
Initially off.
Implementation
bool get handlingInput => _keyDownSubscription != null;
set
handlingInput
(bool value)
Implementation
set handlingInput(bool value) {
if (value == handlingInput) return;
if (value) {
_keyDownSubscription = html.document.body!.onKeyDown.listen(_keyDown);
_keyUpSubscription = html.document.body!.onKeyUp.listen(_keyUp);
} else {
_keyDownSubscription?.cancel();
_keyDownSubscription = null;
_keyUpSubscription?.cancel();
_keyUpSubscription = null;
}
}