- 16 May, 2019 1 commit
-
-
Greg Spencer authored
Until this change, Focus.of would return a FocusScopeNode if it found a FocusScope widget. This isn't really all that useful, and can easily lead to bad situations where many widgets think that the scope they are in (or the root scope!) is their indication of being focused. This changes Focus.of to throw an exception if it doesn't find a Focus widget before reaching the nearest FocusScope widget, or the root of the widget hierarchy. It also adds a nullOk optional bool to Focus.of so that if a caller expects to not find a Focus widget, it can deal with that as it sees fit. I modified InkWell to use this new behavior. This fixes an unreported issue that widgets using an InkWell will be drawn as focused the first time they are visited.
-
- 15 May, 2019 1 commit
-
-
Greg Spencer authored
This implements focus and hover handling for Material buttons. It inserts Focus widgets into the tree in order to allow buttons to be focusable via keyboard traversal (a.k.a. TAB traversal), and Listener widgets into the InkWell to allow the detection of hover states for widgets. Addresses #11344, #1608, and #13264.
-
- 10 May, 2019 1 commit
-
-
Greg Spencer authored
This implements a DefaultFocusTraversal widget to describe the focus traversal policy for its children, defined by a FocusTraversalPolicy object from which custom policies may be created. Pre-defined policies include widget-order traversal, "reading order" traversal and directional traversal.
-
- 25 Apr, 2019 1 commit
-
-
Greg Spencer authored
This re-lands the Focus changes in #30040. Correctness changes in routes.dart, and removes the automatic requesting of focus on reparent when there is no current focus, which caused undesirable selections. Addresses #11344, #1608, #13264, and #1678 Fixes #30084 Fixes #26704
-
- 23 Apr, 2019 1 commit
-
-
Greg Spencer authored
This reverts commit 4218c0bc.
-
- 22 Apr, 2019 1 commit
-
-
Greg Spencer authored
Implements focus traversal for desktop platforms, including re-implementing the existing focus manager and focus tree. This implements a Focus widget that can be put into a widget tree to allow input focus to be given to a particular part of a widget tree. It incorporates with the existing FocusScope and FocusNode infrastructure, and has minimal breakage to the API, although FocusScope.reparentIfNeeded is removed, replaced by a call to FocusAttachment.reparent(), so this is a breaking change: FocusScopeNodes must now be attached to the focus tree using FocusScopeNode.attach, which takes a context and an optional onKey callback, and returns a FocusAttachment that should be kept by the widget that hosts the FocusScopeNode. This is necessary because of the need to make sure that the focus tree reflects the widget hierarchy. Callers that used to call FocusScope(context).reparentIfNeeded in their build method will call reparent on a FocusAttachment instead, which they will obtain by calling FocusScopeNode.attach in their initState method. Widgets that own FocusNodes will need to call dispose on the focus node in their dispose method. Addresses #11344, #1608, #13264, and #1678 Fixes #30084 Fixes #26704
-
- 08 Mar, 2019 1 commit
-
-
Greg Spencer authored
In anticipation of changing a lot of the focus code, I'm adding some tests for the FocusScope. As a result, I was able to find and fix a bug where there was an incorrect assert. I also added some more documentation. Several of the tests enforce what I think is incorrect behavior related to passing focus off when the widget tree gets rebuilt without focus nodes that were previously there, but I'm not going to change that behavior in this PR. I also renamed focus_test.dart to focus_scope_test.dart to be more in line with our naming conventions.
-
- 05 Feb, 2019 1 commit
-
-
Hans Muller authored
Updated focus handling in FocusManager et al and EditableText so that TextFields within nested FocusScopes can gain the focus and show the keybaord.
-
- 12 Sep, 2018 1 commit
-
-
Alexandre Ardhuin authored
* enable lint unnecessary_new * fix tests * fix tests * fix tests
-
- 16 Jul, 2018 1 commit
-
-
Sigurd Meldgaard authored
-
- 05 Jun, 2018 1 commit
-
-
Alexandre Ardhuin authored
-
- 03 May, 2018 1 commit
-
-
Konstantin Scheglov authored
-
- 21 Dec, 2017 1 commit
-
-
Ian Hickson authored
This attempts to apply some of what we learnt from UX studies, namely that people wonder how to add multiple children to widget that take one child.
-
- 04 Dec, 2017 1 commit
-
-
krisgiesing authored
Separate focus management by build owner Currently the focus manager is held by the singleton WidgetBinding. This change places a focus manager in each build owner object, which allows clients to run offscreen pipelines without disturbing focus management for the main UI.
-
- 18 Oct, 2017 1 commit
-
-
Michael Goderbauer authored
* Oct 12 10:12am * implicit_semantics_test.dart passes * refactoring * works in nice * minor rename * more doc comments * to be explicit check better * fix test * ++ * ++ * semantics_9_test (BlockSemantics) and implicit_semantics_test are passing * doc updates * tiny refactor * fix static errors in tests * fix gesture detector * ++ * ++ * geometry * ++ * remove noGeometry * revert test * + * all tests but scrolling/clipping pass * clipping works * scrolling halfway * sliver tests pass * ALL TESTS PASS * SemanticsNode changed * docs and tiny fixes * card test * more doc comments * remove missed print * more tests * make test pass on Linux * remove changes to intellij proj file * review comments
-
- 23 Apr, 2017 1 commit
-
-
Alexandre Ardhuin authored
* more widget const constructors * prefer const constructors * address review comments
-
- 11 Apr, 2017 1 commit
-
-
xster authored
Rename State.config to State.widget Rename State.didUpdateConfig to State.didUpdateWidget Renamed all State subclasses' local variables named config to something else
-
- 05 Apr, 2017 1 commit
-
-
Adam Barth authored
Mostly related to semantics and scrolling.
-
- 31 Mar, 2017 1 commit
-
-
Adam Barth authored
We now have an explicit focus tree that we manage. Instead of using GlobalKeys to manage focus, we use FocusNode and FocusScopeNode objects. The FocusNode is Listenable and notifies when its focus state changes. Focus notifications trigger by tree mutations are now delayed by one frame, which is necessary to handle certain complex tree mutations. In the common case of focus changes being triggered by user input, the focus notificiation still arives in the same frame.
-