1. 19 May, 2021 1 commit
  2. 10 May, 2021 1 commit
  3. 28 Apr, 2021 1 commit
  4. 26 Apr, 2021 1 commit
  5. 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
  6. 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
  7. 03 Apr, 2021 1 commit
  8. 31 Mar, 2021 1 commit
  9. 16 Mar, 2021 1 commit
  10. 19 Jan, 2021 1 commit
  11. 22 Dec, 2020 1 commit
  12. 11 Dec, 2020 1 commit
  13. 03 Dec, 2020 1 commit
  14. 20 Nov, 2020 1 commit
  15. 17 Nov, 2020 1 commit
  16. 16 Nov, 2020 1 commit
  17. 12 Nov, 2020 1 commit
  18. 11 Nov, 2020 1 commit
  19. 05 Nov, 2020 1 commit
  20. 02 Nov, 2020 1 commit
  21. 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
  22. 19 Oct, 2020 1 commit
    • Greg Spencer's avatar
      Mark keys that match a shortcut, but have no action defined as "not handled". (#67359) · 8c03ff8c
      Greg Spencer authored
      - - When I added notification of key events before processing them as text, it made it so that shortcut key bindings like the spacebar would prevent spaces from being inserted into text fields, which is obviously not desirable (and so that change was reverted). At the same time, we do want to make it possible to override key events so that they can do things like intercept a tab key or arrow keys that change the focus.
      
      This PR changes the behavior of the Shortcuts widget so that if it has a shortcut defined, but no action is bound to the intent, then instead of responding that the key is "handled", it responds as if nothing handled it. This allows the engine to continue to process the key as text entry.
      
      This PR includes:
      
      - Modification of the callback type for key handlers to return a KeyEventResult instead of a bool, so that we can return more information (i.e. the extra state of "stop propagation").
      - Modification of the ActionDispatcher.invokeAction contract to require that Action.isEnabled return true before calling it. It will now assert if the action isn't enabled when invokeAction is called. This is to allow optimization of the number of calls to isEnabled, since the shortcuts widget now wants to know if the action was enabled before deciding to either handle the key or to return ignored.
      - Modification to ShortcutManager.handleKeypress to return KeyEventResult.ignored for keys which don't have an enabled action associated with them.
      - Adds an attribute to DoNothingAction that allows it to mark a key as not handled, even though it does have an action associated with it. This will allow disabling of a shortcut for a subtree.
      8c03ff8c
  23. 15 Sep, 2020 1 commit
    • Alexandre Ardhuin's avatar
      Reland "Nnbd widgets" (#65528) · b007a81a
      Alexandre Ardhuin authored
      * Reland "Nnbd widgets (#64672)"
      
      This reverts commit 127e6790.
      
      * remove non-nullable enforcement on AsyncSnapshot
      
      * make data param non-nullable for AsyncSnapshot.withData
      
      * make some Text params non-nullable
      b007a81a
  24. 09 Sep, 2020 2 commits
    • Michael Goderbauer's avatar
      Revert "Nnbd widgets (#64672)" (#65488) · 127e6790
      Michael Goderbauer authored
      This reverts commit e682ec71.
      127e6790
    • Alexandre Ardhuin's avatar
      Nnbd widgets (#64672) · e682ec71
      Alexandre Ardhuin authored
      * migrate widget to nullsafety
      
      * remove double blank line after license
      
      * address review comments in actions.dart
      
      * nullable ObjectKey.value
      
      * use local variable oldElement
      
      * make State.build non-nullable
      
      * make State.context non-nullable
      
      * newline at eof
      
      * make ProxyWidget.child non-nullable
      
      * make _InactiveElements.debugContains non-nullable
      
      * make Element.depth non-nullable
      
      * make ProxyElement.build non-nullable
      
      * make StatefulElement.state non-nullable
      
      * remove 'Notice that'
      
      * avoid cast of list in RenderObjectElement.updateChildren
      
      * make IndexedSlot.value non-nullable
      
      * avoid cast of list in MultiChildRenderObjectElement.mount
      
      * make some WidgetsApp parameters non-nullable
      
      * hitTest take non-nullable position
      
      * make ScrollableState.position non-nullable
      
      * use _pixels instead of pixels
      
      * make ViewportOffset.pixels non-nullable
      
      * make param and return type of IndexedWidgetBuilder non-nullable
      
      * unused_import
      
      * make context param non-nullable for Builder in animated_list.dart
      
      * make ScrollMetrics.viewportDimension non-nullable
      
      * make ScrollMetrics.{min,max}ScrollExtent non-nullable
      
      * make _Location.file non-nullable
      
      * _WidgetForTypeTests.createElement throw UnimplementedError
      
      * update _NullWidget.build error message
      
      * make _ShortcutsState.manager non-nullable
      
      * Fix childCount issues for NNBD
      
      * fix childCount computation on web
      
      * increase max value on js side to compute childCount
      
      * make aspect parameter of dependOnInheritedWidgetOfExactType nullable
      
      * merge has{min,max}ScrollExtent into hasScrollExtents
      
      * update focus_manager.dart
      
      * address review comments in icon.dart
      
      * address review comments in image.dart
      
      * address review comments in routes.dart
      
      * address review comments in scroll_activity.dart
      
      * update doc comments
      
      * make UserScrollNotification.direction non-nullable and required
      
      * rename hasScrollExtents to hasContentDimensions
      
      * unnecessary late
      Co-authored-by: 's avatarIan Hickson <ian@hixie.ch>
      e682ec71
  25. 11 Aug, 2020 1 commit
    • Greg Spencer's avatar
      Make RawKeyboard assert when no keys are in keysPressed when sending a key down event. (#63426) · 0ec0bf50
      Greg Spencer authored
      This adds an assert in RawKeyboard that catches the case where it tries to send a key down event, but (after synchronizing modifiers) there are no keys in keysPressed. This state can occur if the modifier flags are not set properly for the platform.
      
      Also prevents shortcuts attempting to handle a key down when no keys are pressed at the moment (which was causing a crash in release mode).
      0ec0bf50
  26. 29 Jul, 2020 1 commit
  27. 16 Jun, 2020 1 commit
    • Greg Spencer's avatar
      Remove dependency on package:collection by moving mergeSort into... · c5527dc8
      Greg Spencer authored
      Remove dependency on package:collection by moving mergeSort into foundation/collections.dart (#59521)
      
      This removes a dependency from Flutter (package:collection) by copying the implementation of mergeSort into Flutter's foundation/collections.dart.
      
      Also, removed a reference to UnmodifiableSetView from the shortcuts code by just returning a copy instead.
      c5527dc8
  28. 11 Jun, 2020 1 commit
  29. 03 Jun, 2020 1 commit
  30. 07 Apr, 2020 1 commit
    • Greg Spencer's avatar
      Revise Action API (#42940) · 0f68b46f
      Greg Spencer authored
      This updates the Action API in accordance with the design doc for the changes: flutter.dev/go/actions-and-shortcuts-design-revision
      
      Fixes #53276
      0f68b46f
  31. 06 Apr, 2020 1 commit
  32. 20 Mar, 2020 1 commit
  33. 11 Mar, 2020 1 commit
    • Greg Spencer's avatar
      Convert Diagnosticable to a mixin (#51495) · 210f4d83
      Greg Spencer authored
      This converts Diagnosticable to be a mixin instead of an abstract class, so that it can be used to add diagnostics to classes which already have a base class.
      
      It leaves in place the DiagnosticableMixin mixin, since there are some plugins that are still using it, and removing it would mean that those plugins wouldn't work with master branch Flutter anymore. DiagnosticableMixin will be removed once this mixin version of Diagnosticable makes its way to the stable branch.
      210f4d83
  34. 31 Jan, 2020 1 commit
  35. 30 Jan, 2020 1 commit
  36. 28 Jan, 2020 1 commit
  37. 24 Jan, 2020 1 commit
  38. 09 Jan, 2020 1 commit
    • Greg Spencer's avatar
      Simplify the Shortcuts widget diagnostic output (#48265) · 1df6e2af
      Greg Spencer authored
      This simplifies the diagnostic output for the Shortcuts widget so that if a debugLabel is supplied, then that is printed instead of the full list of shortcut keys in the map. Also, the output of the shortcut map is simplified to have the list of keys presented in more readable text.
      1df6e2af
  39. 07 Jan, 2020 1 commit