rowToggle static method
Creates row toggle binding (←/→ or Space to toggle current row).
Used for toggle switches where horizontal arrows or space toggle the value.
Implementation
static KeyBindings rowToggle({
required void Function() onToggle,
String hintLabel = '←/→ / Space',
String hintDescription = 'toggle',
}) {
return KeyBindings([
KeyBinding.multi(
{KeyEventType.arrowLeft, KeyEventType.arrowRight, KeyEventType.space},
(event) {
onToggle();
return KeyActionResult.handled;
},
hintLabel: hintLabel,
hintDescription: hintDescription,
),
]);
}