Fixes https://github.com/flutter/flutter/issues/8476
More detailed list of changes in this patch:
* Replaced the didTouch special logic with more generic logic that
uses Activities instead. Now instead when you tap down the
Scrollable calls `hold()` which begins a HoldScrollActivity which is
a hybrid of DragStartDetails and IdleScrollActivity and can be
canceled. When you let go, it gets canceled and that goes ballistic.
* Make DragGestureRecognizer more aggressive about grabbing pointers,
otherwise a second pointer in a situation with competing horizontal
and vertical recognizers always gets taken by the other one.
* Fixed the _GestureSemantics widget to call the "down" callbacks so
that it follows the same pattern as "real" interactions.
* Added tests for the above.
* Added a hashCode to ScrollActivity.toString (and subclasses).
* Added a toString to ScrollDragController, and include it in
DragScrollActivity's toString.
* s/coorindator/coordinator/
* Add a comment in DragStartDetails to distinguish it from the
otherwise identical DragDownDetails, so we're not tempted to merge
them.
Eliminates Gallery-specific hardcoding of app package and activity name
in the test.
Fixes breakage introduced with 1dc2d4eb430663d3163cc356b091e7415da5ef56
due to main activity class now being MainActivity.
This splits the frame pipeline into two, beginFrame and drawFrame.
As part of making this change I added some debugging hooks that helped
debug the issues that came up:
* I added debugPrintScheduleFrameStacks which prints a stack whenever
a frame is actually scheduled, so you can see why frames are being
scheduled.
* I added some toString output to EditableText and RawKeyboardListener.
* I added a scheduler_tester.dart library for scheduler library tests.
* I changed the test framework to flush microtasks before pumping.
* Some asserts that had the old string literal form were replaced by
asserts with messages.
I also fixed a few subtle bugs that this uncovered:
* setState() now calls `ensureVisualUpdate`, rather than
`scheduleFrame`. This means that calling it from an
AnimationController callback does not actually schedule an extra
redundant frame as it used to.
* I corrected some documentation.
* Adjust the defaults behaviour of scroll views.
Now, primary scroll views scroll by default. Others only scroll if necessary.
* apply suggested changes
* Add a text formatter interface used by EditingText. Provide some default implementations.
* self nits
* Handle -1 selection offsets
* review notes
* simplify regular expression
* Add whitelisting formatters. Use a custom phone number formatter in text demo.
* review notes
* not being able to addAll(null) is pretty annoying
* review notes
* partial tests
* Add tests
* didn’t end up needing mockito
* move to services
Creates another Decoration for drawing outside the decorated box with a gradient to emulate the shadow.
Lets the cupertino transition page's background be transparent.
Fixes#9321
FlutterCommand.runCommand subclasses can optionally return a FlutterCommandResult which is used to append additional analytics.
Fix flutter run timing report and add a bunch of dimensional data