1. 29 Aug, 2023 1 commit
  2. 28 Aug, 2023 2 commits
  3. 23 Aug, 2023 1 commit
  4. 06 Jul, 2023 1 commit
  5. 09 May, 2023 1 commit
  6. 20 Jan, 2023 1 commit
  7. 18 Jan, 2023 1 commit
  8. 31 Oct, 2022 1 commit
  9. 17 Oct, 2022 1 commit
  10. 17 Aug, 2022 1 commit
  11. 19 Jul, 2022 1 commit
  12. 15 Jun, 2022 1 commit
  13. 25 May, 2022 3 commits
    • Greg Spencer's avatar
      Removing Shorcuts.of and Shortctus.maybeOf (#104215) · da24f105
      Greg Spencer authored
      This removes Shorcuts.of and Shortctus.maybeOf because they're not especially useful, since the only thing you can really set on a ShortcutManager is the shortcuts, and the Shortcuts widget that you give it to manages those, so if it rebuilds, it overwrites what you set.
      
      Also, adds a Shortcuts.manager constructor and removes the manager argument to the Shortcuts widget.
      
      Removing these will also eliminate an InheritedWidget for each Shortcuts widget, improving memory usage.
      da24f105
    • Michael Goderbauer's avatar
      d5fbc375
    • Greg Spencer's avatar
      A bunch of cleanups and a missing `ShortcutRegistar` in `WidgetsApp` (#104560) · 0a417c3b
      Greg Spencer authored
      A bunch of random cleanup things I found while doing MenuBar development.
      
      Changes an if test to an assert in binding.dart, since the if should always be true.
      Adds the default ShortcutRegistrar that should have been in the ShortcutRegistry PR.
      Moves a debug message in the FocusManager to print the result after the focus change instead of before.
      Reorders the test parameters in theme_data_test.dart to match the order of the theme data fields everywhere else.
      0a417c3b
  14. 19 May, 2022 1 commit
    • 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
  15. 14 Apr, 2022 1 commit
  16. 30 Mar, 2022 1 commit
  17. 07 Jan, 2022 1 commit
  18. 14 Dec, 2021 1 commit
  19. 17 Nov, 2021 1 commit
  20. 29 Jul, 2021 1 commit
  21. 28 Jul, 2021 1 commit
  22. 26 Jul, 2021 1 commit
  23. 09 Jul, 2021 1 commit
  24. 19 May, 2021 1 commit
  25. 14 May, 2021 1 commit
  26. 28 Apr, 2021 1 commit
  27. 15 Apr, 2021 1 commit
    • Tong Mu's avatar
      Shortcut activator (#78522) · eb735167
      Tong Mu authored
      This PR introduced a new class, ShortcutActivator, and refactored the the definition and lookup system of shortcuts, in order to solve a few issues of the previous algorithm.
      eb735167
  28. 14 Apr, 2021 1 commit
    • Greg Spencer's avatar
      Handle null primary focus when receiving key events (#80302) · 6b06943c
      Greg Spencer authored
      This allows the key handling code in the shortcut manager to function when there is a null primaryFocus. The primary focus can be null only in some special circumstances (e.g. when an app hasn't set any focus at all), but that shouldn't cause a crash.
      6b06943c
  29. 28 Mar, 2021 1 commit
  30. 27 Mar, 2021 1 commit
  31. 25 Mar, 2021 1 commit
  32. 24 Mar, 2021 2 commits
  33. 04 Mar, 2021 1 commit
  34. 17 Feb, 2021 1 commit
  35. 05 Jan, 2021 1 commit
  36. 29 Oct, 2020 1 commit
    • Greg Spencer's avatar
      Remove nullOk parameter from Shortcuts.of, Actions.find, and Actions.handler (#68921) · 4f586fa3
      Greg Spencer authored
      This removes the nullOk parameter from Shortcuts.of, Actions.find and Actions.handler and created Shortcuts.maybeOf and Actions.maybeFind. Shortcuts.of and Actions.find now return non-nullable values, and the maybe versions return a nullable value. I didn't create a non-nullable version of Actions.handler, since it needs to be able to return null if an action is not enabled, but I did remove the nullOk parameter, effectively setting it to true permanently, since setting it to false doesn't make much sense if the function can still return null when the action is not enabled.
      4f586fa3