confirm static method
KeyBindings
confirm({
- KeyActionResult onConfirm()?,
- String hintLabel = 'Enter',
- String hintDescription = 'confirm',
Creates confirm binding (Enter).
Implementation
static KeyBindings confirm({
KeyActionResult Function()? onConfirm,
String hintLabel = 'Enter',
String hintDescription = 'confirm',
}) {
return KeyBindings([
KeyBinding.single(
KeyEventType.enter,
(event) => onConfirm?.call() ?? KeyActionResult.confirmed,
hintLabel: hintLabel,
hintDescription: hintDescription,
),
]);
}