cancel static method
Creates cancel bindings (Esc and Ctrl+C).
Implementation
static KeyBindings cancel({
void Function()? onCancel,
String hintLabel = 'Esc',
String hintDescription = 'cancel',
}) {
return KeyBindings([
KeyBinding.multi(
{KeyEventType.esc, KeyEventType.ctrlC},
(event) {
onCancel?.call();
return KeyActionResult.cancelled;
},
hintLabel: hintLabel,
hintDescription: hintDescription,
),
]);
}