horizontalNavigation static method
Creates horizontal navigation bindings (←/→).
Implementation
static KeyBindings horizontalNavigation({
required void Function() onLeft,
required void Function() onRight,
String hintLabel = '←/→',
String hintDescription = 'adjust',
}) {
return KeyBindings([
KeyBinding.single(
KeyEventType.arrowLeft,
(event) {
onLeft();
return KeyActionResult.handled;
},
),
KeyBinding.single(
KeyEventType.arrowRight,
(event) {
onRight();
return KeyActionResult.handled;
},
hintLabel: hintLabel,
hintDescription: hintDescription,
),
]);
}