KeyBinding.single constructor

KeyBinding.single(
  1. KeyEventType key,
  2. KeyActionResult action(
    1. KeyEvent event
    ), {
  3. String? hintLabel,
  4. String? hintDescription,
})

Creates a binding for a single key type.

Implementation

factory KeyBinding.single(
  KeyEventType key,
  KeyActionResult Function(KeyEvent event) action, {
  String? hintLabel,
  String? hintDescription,
}) {
  return KeyBinding(
    keys: {key},
    action: action,
    hintLabel: hintLabel,
    hintDescription: hintDescription,
  );
}