- 30 May, 2019 3 commits
-
-
Todd Volkert authored
Tickers being disabled and re-enabled can cause the condition of a synchronous notification happening after image frames have been delivered, which is valid in that case. As such, this removes the assert. https://github.com/flutter/flutter/issues/32374
-
Greg Spencer authored
This PR solves two problems: currently, the onExit is called for a mouse pointer the moment the removal message is received, except that by the time it actually calls it, there is no _lastEvent for it in the mouse tracker (it's already been removed), resulting in an event being passed to the onExit that contains nulls for the position. Also, removePointer events don't actually get created with a position, although they easily could be, so that even the the _lastEvent in the mouse tracker were still populated, it would still give a null position and delta. This PR adds support for the position and delta in a PointerRemovedEvent, and populates them. In addition, when a remove event is received, it doesn't actually remove the pointer until the mouse position check that gets scheduled actually happens.
-
chunhtai authored
-
- 29 May, 2019 2 commits
-
-
LongCatIsLooong authored
- Fixed extentInside calculation in ScrollMetrics - Added asserts to extentInside getter, as well as ScrollPosition.applyContentDimensions to enforce minScrollExtent <= maxScrollExtent - Added padding to ScrollbarPainter, updated implementation. Took care of some edge cases. - Changed some scroll bar constants on Cupertino side.
-
Todd Volkert authored
This adds two new builders to the `Image` class: * `frameBuilder`, which allows callers to control the widget created by an [Image]. * `loadingBuilder`, which allows callers fine-grained control over how to display loading progress of an image to the user. `FadeInImage` can be simplified by migrating to the new API. This is done in a follow-on commit. https://github.com/flutter/flutter/issues/32374
-
- 28 May, 2019 2 commits
-
-
Harry Terkelsen authored
* Deprecates `BinaryMessages` in favor of a default instance of `BinaryMessenger`, called `defaultBinaryMessenger` * Platform channels use the `defaultBinaryMessenger` for their binaryMessenger default argument.
-
Greg Spencer authored
Replacing the algorithm for finding the first focusable item in the focus tree. Somehow it was a kind of gibberish before, and really didn't work or make sense.
-
- 25 May, 2019 1 commit
-
-
Chris Bracken authored
Updates documentation and non-public API to use American spellings for consistency with the rest of the codebase. No changes to behaviour... other than how it's spelt.
-
- 21 May, 2019 2 commits
-
-
Greg Spencer authored
This just fixes up some comments for DefaultFocusTraversal, and fixes a minor bug when setting the onKey on a FocusNode on creation before attaching to it.
-
Todd Volkert authored
The current API was broken in that you registered multiple callbacks at once, but when you removed listeners, only the primary listener was used to determine what was removed. This led to unintuitive cases where the caller could get unexpected behavior. This updates the API to add and remove listeners using a newly introduced [ImageStreamListener] object, a value object that has references to the individual callbacks that may fire. flutter/flutter#24722 flutter/flutter#32374 flutter/flutter#32935
-
- 20 May, 2019 1 commit
-
- 16 May, 2019 3 commits
-
-
chunhtai authored
-
Alexandre Ardhuin authored
* use null aware operators * rollback changes about null-aware operator * disable lint prefer_is_not_empty
-
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 4 commits
-
-
Amir Hardon authored
The PlatformViewsService listens for `viewFocused` calls on the platform_views system channel and fires a callback that focuses the focus node for the relevant AndroidView widget.
-
Hans Muller authored
-
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.
-
Greg Spencer authored
This fixes propagation of needsCompositing from child widgets. When needsCompositing is turned on by a child widget, it necessarily sets the needsCompositing bit of its parent widget, but RenderPointerListener was ignoring that piece of information and only turning on compositing if it thought it needed it for itself. This corrects that, and adds a test for the condition, and updates a test that was affected by the change. Fixes #32525 (again)
-
- 14 May, 2019 4 commits
-
-
Mouad Debbar authored
-
Mouad Debbar authored
This reverts commit 18ca3754.
-
Mouad Debbar authored
-
Greg Spencer authored
Added diagnostic output for needsCompositing to RenderObject diagnostics output.
-
- 13 May, 2019 1 commit
-
-
Greg Spencer authored
This fixes #32525, because it now marks the compositing bits as needing to be recalculated if the mouse tracker changes its idea of whether or not a mouse is attached. This bug occurred because the test framework was leaking state from one test to the next (the state about whether a mouse pointer was active), and so even though there was a "passing" test when run in order with the other tests in the file, when the test was run individually (or first), it would have failed and caught the bug. This adds an assert to make sure that after each test there are no simulated mouse pointers connected, and now calls removePointer in all of the tests where this was a problem.
-
- 10 May, 2019 3 commits
-
-
Kate Lovett authored
Revert "Merge branch 'master' into master" This reverts commit e3a03c04, reversing changes made to 64749826.
-
Dan Field authored
-
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.
-
- 09 May, 2019 3 commits
-
-
Phil Quitslund authored
* update immutable to const * => const lists * revert making list const * make Centers const
-
Phil Quitslund authored
* make immutables const
-
Greg Spencer authored
This changes Listener to trigger enter/move/exit in all Listeners below the pointer, not just the leaf region (the first region hit). This is because we need to allow listeners to be nested so that, say, a widget that handles changing color on hover, but also is wrapped in a Tooltip (that handles hover) can trigger both actions, not just one. To that end, I added a findAll to Layer, similar to the existing find method that was previously used. It returns an iterator over annotated layers which match the given data type. Since the findAll is implemented as returning an Iterable (and is sync*), I re-implemented the find routines as just returning the first result from findAll, since that should be just as efficient, and would then prevent duplication in the implementation.
-
- 08 May, 2019 1 commit
-
-
Greg Spencer authored
I recently added some code to keep hover events from being propagated when a mouse wasn't attached. While that works, there are times when it can fire callbacks during the building of other components, since they can now be called from detach/attach. This is not ideal, since it will assert then. This changes the code so that it won't update the annotations during attach/detach, but also won't push the annotation layer unless a mouse is connected, achieving the same result as before, but with better semantics. The basic problem is that in the detach for RenderPointerListener, it would detach the annotation, which could cause onExit to be called on the annotation, since the widget was disappearing under the mouse, and thus needs to receive an onExit, but that onExit might be (and probably will be) calling setState, which marks the owning widget as needing to be built, sometimes when it already has been. The fix creates a new _ListenerElement that overrides activate and deactivate in order to tell the render object ahead of the detach that it might be detached, and so the onExit gets called before the detach instead of during it. In addition, I now avoid scheduling more than one check for mouse positions per frame.
-
- 06 May, 2019 4 commits
-
-
yaheng authored
-
Michael Goderbauer authored
-
Michael Goderbauer authored
This reverts commit d2de911d.
-
Simon Binder authored
-
- 03 May, 2019 2 commits
-
-
Justin McCandless authored
Add `textWidthBasis` param to Text to allow calculating width according to longest line.
-
chunhtai authored
-
- 02 May, 2019 4 commits
-
-
Kate Lovett authored
-
Justin McCandless authored
This reverts commit 323108ff due to weird engine dependency bug
-
Justin McCandless authored
Add `textWidthBasis` param to Text to allow calculating width according to longest line.
-
Jacob Richman authored
-