verticalNavigation static method
Creates vertical navigation bindings (↑/↓).
Implementation
static KeyBindings verticalNavigation({
required void Function() onUp,
required void Function() onDown,
String hintLabel = '↑/↓',
String hintDescription = 'navigate',
}) {
return KeyBindings([
KeyBinding.single(
KeyEventType.arrowUp,
(event) {
onUp();
return KeyActionResult.handled;
},
),
KeyBinding.single(
KeyEventType.arrowDown,
(event) {
onDown();
return KeyActionResult.handled;
},
hintLabel: hintLabel,
hintDescription: hintDescription,
),
]);
}