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