toggleGroup static method
KeyBindings
toggleGroup({
- required void onUp(),
- required void onDown(),
- required void onToggle(),
- required void onToggleAll(),
- KeyActionResult onConfirm()?,
- void onCancel()?,
Creates toggle group bindings: vertical nav + row toggle + 'A' for all + prompt.
Pairs nicely with ToggleGroupView components where keyboard support
needs to feel consistent with CLI conventions.
Implementation
static KeyBindings toggleGroup({
required void Function() onUp,
required void Function() onDown,
required void Function() onToggle,
required void Function() onToggleAll,
KeyActionResult Function()? onConfirm,
void Function()? onCancel,
}) {
return verticalNavigation(onUp: onUp, onDown: onDown) +
rowToggle(onToggle: onToggle) +
letter(char: 'A', onPress: onToggleAll, hintDescription: 'toggle all') +
confirm(onConfirm: onConfirm) +
cancel(onCancel: onCancel);
}