I want to make webOS app with Flutter and use this app in TV, I have a List of items, consider 3 rows which are having 10 items each, and all scrollable, I want to move between them by keyboard and pressing arrow keys, like when I press arrow right it should go to next item, left previous item and when i press down it should start from the first item of the next list. the arrow right and left keys are working fine but arrow down and up are not working as expected. when I press arrow key down its going to closest item in direction down, which is a correct behaviour if its a grid view but not for the list which is my case.
I added the shortcuts to enable the arrow keys, I tried the custom policy but that did not work.
Till now i tried adding shortcuts inside MaterialApp :
shortcuts: {
// Activation
SingleActivator(LogicalKeyboardKey.enter): ActivateIntent(),
SingleActivator(LogicalKeyboardKey.numpadEnter): ActivateIntent(),
SingleActivator(LogicalKeyboardKey.space): ActivateIntent(),
SingleActivator(LogicalKeyboardKey.gameButtonA): ActivateIntent(),
SingleActivator(LogicalKeyboardKey.select): ActivateIntent(),
// Dismissal
SingleActivator(LogicalKeyboardKey.escape): DismissIntent(),
LogicalKeySet(LogicalKeyboardKey.arrowLeft): const DirectionalFocusIntent(
TraversalDirection.left,
ignoreTextFields: false,
),
LogicalKeySet(LogicalKeyboardKey.arrowRight): const DirectionalFocusIntent(
TraversalDirection.right,
ignoreTextFields: false,
),
LogicalKeySet(LogicalKeyboardKey.arrowDown): const DirectionalFocusIntent(
TraversalDirection.down,
ignoreTextFields: false,
),
LogicalKeySet(LogicalKeyboardKey.arrowUp): const DirectionalFocusIntent(
TraversalDirection.up,
ignoreTextFields: false,
),
LogicalKeySet(LogicalKeyboardKey.space): const ActivateIntent(),
},
and also i tried to wrap my list with FocusTraversalGroup:
return FocusTraversalGroup(
policy: ReadingOrderTraversalPolicy(),
child: ListView(
I also tried WidgetOrderTraversalPolicy as a policy.
but neither of them worked to achieve my goal.