If the scroll is out of range for any reason (for instance, changing scroll physics or manually messing with scroll position), the spring simulation causes the scroll position to slingshot towards the end. Also, before this change, `end` was unused.
Before this PR AndroidView's gestureRecognizers field was a list of
gesture recognizers. This was problematic as when the widget was rebuilt
with the same gesture recognizer instances we would try to re-join the
recognizers to a gesture arena team and crash (as a OneSeqeunceGestureRecognizer
team can only be set once).
With this change, we instead take a set of factories.
This allows AndroidView to create the gesture recognizers just before
adding them to the team, and thus be sure that they are only added once to a
team.
The factories are identified by the type of the object they create, this
allows AndroidView to know when it is given an equivalent set of gesture
recognizer factories, and do nothing in that case.
* Refactor AnimatedSwitcher
This is mostly just a little bit of cleanup with hopefully no semantic
changes, done to teach me how the code works so that I could fix a bug.
* Add debugging information to AnimatedSwitcher
* Fix AnimatedSwitcher to handle the case of back-to-back changes
Previously, if a child was replaced the very next frame after it was
added, we'd get confused because we tried to reverse the controller,
which causes us to remove the child from the going-away list, before
we had added the child to the list in the first place.
The fix is just to move the reverse to after the add.
* Make CupertinoApp and MaterialApp both use WidgetsApp for Navigator
* Make CupertinoApp and MaterialApp const constructors
* Make WidgetsApp routes aware
* Update tests
* Revert "Revert "Add RichText support to find.text" (#22046)"
This reverts commit 8e704219138147bc0a46e9547cbe6519cf0bb6c7.
* Revert "Implement Double Tap Handling in TextField and Editable (#21264)"
This reverts commit 02e87334ddb9f64a2ff12c0dc201f3e410e74be7.
Thanks @NikoYuwono for getting this working! We appreciate your help!
* Implement Double Tap Handling in TextField and Editable
* Fix test broken by the change and add test for double tap
* Fix affected tests
* Remove unnecessary new
* Fix test
Add back screenshot extension that was temporarily disabled.
Add matchesReferenceImage matcher to test that the screenshot extension
generates equivalent images to InspectorService.instance.screenshot.
* Ensure that the _childElements map is properly traversed as a sparse list and not inflated with garbage collected children.
* Add tests to ensure Lists/Tabs with KeepAlive children can make large jumps, don't lose children (including after rebuild).
This reverts commit 343b57036a94ee9b0131d4d957372a147f8d838d.
Reverting because the assert introduced in framework.dart(inheritFromElement) is breaking certain Mulligan pages. @hixie suspects it might be due to global keys.
This recognizer can be passed in AndroidView's gesureRecognizers when we
want all touch events in the view bounds to be immediately dispatched
to the Android view.
Enable taking screenshots of arbitrary RenderObjects from a running application from within the inspector.
Key functionality is in the added _ScreenshotPaintingContext class.
Added InheritedModel: An InheritedWidget that's intended to be used as the base class for models whose dependents may only depend on one part or "aspect" of the overall model.
This was a bug, when e.g a LongPressGestureRecognizer was in the gesture
arena, the android view gesture team may not yet win the arena when the
last pointer was up. This change allows AndroidView to win the gesture
even after all pointers are up.
This re-lands commit c594696.
The original PR was breaking the integration test as while the
gesture was active the AndroidView's parent widget got rebuilt which
disposed the _AndroidViewGestureRecognizer and dropped pointer events
from that point on.
This change adds a unit test that reproduces the failure case, and
fixes it by not rebuilding the _AndroidViewGestureRecognizer if the
list of gesture recognizers did not change.