'Assign accesskey to a Flutter generated a tag

I have a TabView in Flutter for web to which I would like to accesskey

<a accesskey="D" ... >Donwload</a>

Please advice how this can be achieved.



Solution 1:[1]

Wrap the current Scaffold in a RawKeyboardListener as shown below.

Then, use key.data to call your TabController and navigate to the releated Tab. key.data corresponds to a specific key.

RawKeyboardListener(
  onKey: (key) => print(key.data),
  child: Scaffold( ... )
)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Dabbel