Also:
* Make TextPainter.preferredLineHeight honour root fontSize
* Remove bogus docs.
* More aggressively track dirty state for RenderEditable.
* Some tests.
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.
Also:
* Add three explicit sizing modes to Stack for non-positioned
children: loose, expand, and passthrough. (All three are used.)
* Fix a bug whereby layers would try to paint in the same frame as
they were removed from layout (but not detached).
* Fix a bug whereby Offstage wasn't properly marking the parent dirty
when changing its sizedByParent flag.
* Explicitly make Overlay expand non-positioned children.
* Explicitly have InputDecoration pass through the constraints from
its Row to its Stack children.
* Manually fix every use of Point.x and Point.y
Some of these were moved to dx/dy, but not all.
* Manually convert uses of the old gradient API
* Remove old reference to Point.
* Mechanical changes
I applied the following at the root of the Flutter repository:
git ls-files -z | xargs -0 sed -i 's/\bPoint[.]origin\b/Offset.zero/g'
git ls-files -z | xargs -0 sed -i 's/\bPoint[.]lerp\b/Offset.lerp/g'
git ls-files -z | xargs -0 sed -i 's/\bnew Point\b/new Offset/g'
git ls-files -z | xargs -0 sed -i 's/\bconst Point\b/const Offset/g'
git ls-files -z | xargs -0 sed -i 's/\bstatic Point /static Offset /g'
git ls-files -z | xargs -0 sed -i 's/\bfinal Point /final Offset /g'
git ls-files -z | xargs -0 sed -i 's/^\( *\)Point /\1Offset /g'
git ls-files -z | xargs -0 sed -i 's/ui[.]Point\b/ui.Offset/g'
git ls-files -z | xargs -0 sed -i 's/(Point\b/(Offset/g'
git ls-files -z | xargs -0 sed -i 's/\([[{,]\) Point\b/\1 Offset/g'
git ls-files -z | xargs -0 sed -i 's/@required Point\b/@required Offset/g'
git ls-files -z | xargs -0 sed -i 's/<Point>/<Offset>/g'
git ls-files -z | xargs -0 sed -i 's/[.]toOffset()//g'
git ls-files -z | xargs -0 sed -i 's/[.]toPoint()//g'
git ls-files -z | xargs -0 sed -i 's/\bshow Point, /show /g'
git ls-files -z | xargs -0 sed -i 's/\bshow Point;/show Offset;/g'
* Mechanical changes - dartdocs
I applied the following at the root of the Flutter repository:
git ls-files -z | xargs -0 sed -i 's/\ba \[Point\]/an [Offset]/g'
git ls-files -z | xargs -0 sed -i 's/\[Point\]/[Offset]/g'
* Further improvements and a test
* Fix minor errors from rebasing...
* Roll engine
* Fix tests to use Ahem, and helpful changes around that
- Fix fonts that had metric-specific behaviours.
- LiveTestWidgetsFlutterBinding.allowAllFrames has been renamed
to LiveTestWidgetsFlutterBinding.framePolicy.
- LiveTestWidgetsFlutterBinding now defaults to using a frame policy
that pumps slightly more frames, to animate the pointer crosshairs.
- Added "flutter run --use-test-fonts" to enable Ahem on devices.
- Changed how idle() works to be more effective in live mode.
- Display the test name in live mode (unless ahem fonts are enabled).
- Added a toString to TextSelectionPoint.
- Style nit fixes.
* Roll engine to get Ahem changes.
* Update tests for dartdoc changes.
* Fix flutter_tools tests
Fixes https://github.com/flutter/flutter/pull/8643
Fixes https://github.com/flutter/flutter/issues/8804 by adding a test
to verify that Material elevation changes animate.
Also tweak some dartdocs, add some trailing commas, improve some
toString output, make the inkwell test agnostic to the PhysicalModel
logic, and move the material buttons test to the material test
directory.
* Bump to Dart SDK 1.23.0-dev.10
* allows us to understand flutter usage via telemetry
* brings in `@immutable`
Fixes: #9042
* completer fix
* Update to platform 1.1.1.
Since RelativeRect's whole purpose in life is to make work with Stack
easier, it's silly that you can't directly use it with Positioned.
Also, tests for RelativeRect.
And fixes for the bugs that found...
This patch adds grid supports to slivers and introduces a ScrollGrid
convenience class for making the common types of scrollable grids.
This patch also deploys ScrollGrid in an example in the Flutter Gallery.
Add SliverList
A SliverList is a linear layout of box children in a viewport that all
have a common, fixed extent along the scroll axis. The layout is similar
to a SliverBlock but more efficient.
I plan to use this to implement similar logic in SliverPadding.
To make this easier to test I extended the paints matcher to accept a
function that takes a canvas. While I was at it I also made it accept
a Finder, it'll go and find the render object for you.
Also added support for paints..path and fixed some grammar in the
error messages.
Also improved the docs for debugPaint*.
This widget is a replacement for ScrollableViewport that uses the new
Scrollable2 machinery. The widget is not based on Slivers but does use the new
scroll behavior classes.
MockCanvas to use it instead.
Currently it only supports a very limited set of drawing features, but
adding new ones is easy.
Once the feature set is more complete, and we've used this a bunch, if
it feels right, this API will get promoted to flutter_test.