onKeyEvent method

void onKeyEvent(
  1. KeyEvent event
)

Override this event handler if you want to get notified whenever any key on a keyboard is pressed, held, or released. The event will be one of KeyDownEvent, KeyRepeatEvent, or KeyUpEvent, respectively.

Implementation

void onKeyEvent(KeyEvent event) => _onKeyEvent?.call(event);