toggle static method
Creates toggle binding (Space).
Implementation
static KeyBindings toggle({
required void Function() onToggle,
String hintLabel = 'Space',
String hintDescription = 'toggle',
}) {
return KeyBindings([
KeyBinding.single(
KeyEventType.space,
(event) {
onToggle();
return KeyActionResult.handled;
},
hintLabel: hintLabel,
hintDescription: hintDescription,
),
]);
}