• Greg Spencer's avatar
    Add ShortcutsRegistry (#103456) · f6c3ee31
    Greg Spencer authored
    This adds a ShortcutsRegistry for ShortcutActivator to Intent mappings that can be modified from its descendants.
    
    This is so that descendants can make shortcuts dynamically available to a larger portion of the app than just their descendants. This is a precursor needed by the new MenuBar, for instance, so that the menu bar itself can be placed where it likes, but the shortcuts it defines can be in effect for most, if not all, of the UI surface in the app. For example, the "Ctrl-Q" quit binding would need to work even if the focused widget wasn't a child of the MenuBar.
    
    This just provides the shortcut to intent mapping, the actions activated by the intent are described in the context where they make sense. For example, defining a "Ctrl-C" shortcut mapped to a "CopyIntent" should perform different functions if it happens while a TextField has focus vs when a drawing has focus, so those different areas would need to define different actions mapped to "CopyIntent". A hypothetical "QuitIntent" would probably be active for the entire app, so would be mapped in an Actions widget near the top of the hierarchy.
    f6c3ee31
Name
Last commit
Last update
..
README.md Loading commit data...
_bitfield_io.dart Loading commit data...
_bitfield_web.dart Loading commit data...
_isolates_io.dart Loading commit data...
_isolates_web.dart Loading commit data...
_platform_io.dart Loading commit data...
_platform_web.dart Loading commit data...
annotations.dart Loading commit data...
assertions.dart Loading commit data...
basic_types.dart Loading commit data...
binding.dart Loading commit data...
bitfield.dart Loading commit data...
change_notifier.dart Loading commit data...
collections.dart Loading commit data...
consolidate_response.dart Loading commit data...
constants.dart Loading commit data...
debug.dart Loading commit data...
diagnostics.dart Loading commit data...
isolates.dart Loading commit data...
key.dart Loading commit data...
licenses.dart Loading commit data...
math.dart Loading commit data...
node.dart Loading commit data...
object.dart Loading commit data...
observer_list.dart Loading commit data...
platform.dart Loading commit data...
print.dart Loading commit data...
serialization.dart Loading commit data...
stack_frame.dart Loading commit data...
synchronous_future.dart Loading commit data...
unicode.dart Loading commit data...