FocusOnKeyCallback typedef Null safety

dynamic FocusOnKeyCallback(
  1. FocusNode node,
  2. 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

// TODO(gspencergoog): Convert this from dynamic to KeyEventResult once migration is complete.
typedef FocusOnKeyCallback = dynamic Function(FocusNode node, RawKeyEvent event);