* Let Theme insert an IconTheme into the widget tree
* flip the order, no real reason
* Let icon theme use its own fallback
* review notes
* more review notes
Previously we used logical pixels. This made the accessibility metrics
tiny on modern devices, since the OS works in physical units.
Also add a bit more debugging info and some docs.
Also:
* Make TextPainter.preferredLineHeight honour root fontSize
* Remove bogus docs.
* More aggressively track dirty state for RenderEditable.
* Some tests.
If the caller doesn't explicitly give the brightness of the primary
color, we now estimate it using an algorithm from the Web Content
Accessibility Guidelines.
Also, this patch contains a function that converts RGB colors to
HSVColors. I was originally going to use that, but the WCAG algorithm
ended up seeming like a better choice. The patch still includes this
function because it's generally useful.
Fixes#5718
Also, I had a question about flutter_test matchers and our style guide
says that when I have a question I should update the docs so I did
that and then got a bit carried away.
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.
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