isConsumed method

bool isConsumed(
  1. KeyEvent event
)

Whether event is the latest event seen by handleKeyEvent and was consumed.

HardwareKeyboard handlers run before the focus system, but cannot stop it from seeing the event. KeyboardWedgeListener uses this in a Focus so that the Enter or Tab that ends a scan does not also press a focused button or move focus.

Implementation

bool isConsumed(KeyEvent event) => _lastConsumed && identical(event, _lastEvent);