1. 07 Aug, 2021 1 commit
  2. 04 Aug, 2021 2 commits
  3. 29 Jul, 2021 1 commit
  4. 28 Jul, 2021 1 commit
  5. 26 Jul, 2021 1 commit
  6. 15 Jul, 2021 1 commit
  7. 14 Jul, 2021 3 commits
  8. 13 Jul, 2021 2 commits
  9. 25 Jun, 2021 1 commit
  10. 10 May, 2021 1 commit
  11. 15 Apr, 2021 1 commit
  12. 14 Apr, 2021 1 commit
  13. 13 Apr, 2021 1 commit
  14. 12 Apr, 2021 1 commit
  15. 03 Apr, 2021 1 commit
  16. 31 Mar, 2021 1 commit
  17. 12 Mar, 2021 2 commits
  18. 13 Feb, 2021 1 commit
    • Todd Volkert's avatar
      Fix FocusManager constructor (#75894) · 835c7fab
      Todd Volkert authored
      The FocusManager constructor was registering global event handlers
      on the shared RawKeyboard instance and the global pointer router.
      This posed a few problems: (1) there was no way to unregister these
      handlers, and (2) instantiating a second FocusManager would overwrite
      the existing focus manager's RawKeyboard handler. This was manifesting
      in unexpected ways, such as the fact that constructing a second
      BuildOwner (for a parallel tree, for instance) was obliterating the
      event handler for the main BuildOwner's focus manager, thus messing
      with focus.
      
      This change separates those global event registrations into a
      dedicated method, registerGlobalHandlers(), and overrides dispose()
      to properly unregister those handlers.
      835c7fab
  19. 12 Feb, 2021 1 commit
  20. 24 Dec, 2020 1 commit
  21. 11 Dec, 2020 1 commit
  22. 02 Nov, 2020 1 commit
  23. 29 Oct, 2020 1 commit
  24. 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
  25. 10 Oct, 2020 1 commit
  26. 27 Sep, 2020 1 commit
  27. 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
  28. 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
  29. 30 Jul, 2020 1 commit
  30. 29 Jul, 2020 2 commits
  31. 28 Jul, 2020 1 commit
  32. 23 Jul, 2020 1 commit
    • Greg Spencer's avatar
      Fix `ExcludeFocus` so it won't refocus a sibling of the focused node. (#61756) · cac22cdb
      Greg Spencer authored
      This changes FocusNode.descendantsAreFocusable so that it doesn't allow the enclosing scope to re-focus a node that is a descendant of the node with descendantsAreFocusable set to false.
      
      Because of the order in which the internal state for descendantsAreFocusable was being set, setting it to false was causing a sibling node to be focused when descendantsAreFocusable of the parent was set to false, even though it shouldn't have been focusable, because the enclosing scope would search for a candidate to be focused before the internal state was set to false.
      
      Instead of looping over the children and telling them all to unfocus (and select the previously focused node), this unfocuses the node that has descendantsAreFocusable set to false, with the disposition UnfocusDisposition.previouslyFocusedChild, so that its enclosing scope will look for a previously focused child that isn't part of the subtree being excluded.
      
      This affects how the ExcludeFocus widget behaves when turning on exclude.
      cac22cdb
  33. 25 Jun, 2020 1 commit