addLateKeyEventHandler method

void addLateKeyEventHandler(
  1. OnKeyEventCallback handler
)

Adds a key event handler to a set of handlers that are called if none of the key event handlers in the focus tree handle the event.

If the event reaches the root of the focus tree without being handled, then all of the handlers in the set will be called. If any of them returns KeyEventResult.handled or KeyEventResult.skipRemainingHandlers, then event propagation to the platform will be stopped.

If handlers are added while the existing callbacks are being invoked, they will not be called until the next key event is not handled by the focus tree.

See also:

Implementation

void addLateKeyEventHandler(OnKeyEventCallback handler) {
  _highlightManager.addLateKeyEventHandler(handler);
}