bindings property Null safety

Map<ShortcutActivator, VoidCallback> bindings

A map of key combinations to callbacks used to define the shortcut bindings.

If a descendant of this widget has focus, and a key is pressed, the activator keys of this map will be asked if they accept the key event. If they do, then the corresponding callback is invoked, and the key event propagation is halted. If none of the activators accept the key event, then the key event continues to be propagated up the focus chain.

If more than one activator accepts the key event, then all of the callbacks associated with activators that accept the key event are invoked.

Some examples of ShortcutActivator subclasses that can be used to define the key combinations here are SingleActivator, CharacterActivator, and LogicalKeySet.


final Map<ShortcutActivator, VoidCallback> bindings;