FocusOnKeyCallback typedef Null safety

FocusOnKeyCallback = KeyEventResult Function(FocusNode node, RawKeyEvent event)

Signature of a callback used by Focus.onKey and FocusScope.onKey to receive key events.

The node is the node that received the event.

Returns a KeyEventResult that describes how, and whether, the key event was handled.

Implementation

typedef FocusOnKeyCallback = KeyEventResult Function(FocusNode node, RawKeyEvent event);