synchronized_keyboard_listener

Creator: coderz1093

Last updated:

0 purchases

synchronized_keyboard_listener Image
synchronized_keyboard_listener Images

Languages

Categories

Add to Cart

Description:

synchronized keyboard listener

synchronized_keyboard_listener #
A keyboard listener with the ability to block keyboard events from bubbling up. This means if you have multiple SynchronizedKeyboardListener's only one will be able to act on any given keyboard event: the one lowest down in the tree that is listening for that particular key.
How it works is upon creation it looks for parent SynchronizedKeyboardListener's and forms a linked list of them. This allows them to synchronize their behaviour.
Usage #
The widget is self explanatory.
SynchronizedKeyboardListener(
keyEvents: <LogicalKeyboardKey, Function()> {
LogicalKeyboardKey.escape : () { Navigator.of(context).pop(); },
LogicalKeyboardKey.enter : () { Navigator.of(context).pop(); },
},
child: ...
)
copied to clipboard
The key events argument tells us which keys to listen for and what to do if they are triggered.

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.