This reverts commit f41b3411da35929b09009e47cb52474389e42874, reversing
changes made to e33d8d96212f3e337a6660f1eb1118bffc945bf5.
This was a bad check-in due to my mangling uploading a new version of the branch from a different machine.
This reverts https://github.com/flutter/flutter/pull/2639 and will be replaced by https://github.com/flutter/flutter/pull/2640
If there's not enough height for the given aspect ratio, we now try to see if
using the height to infer the width will fit the given constraints. The
algorithm we use is similar to the one we use for RenderImage.
Fixes#2620
Transform applies its transform before painting, but sometimes you want
the widget to layout after its transform has been applied. We can't
handle general tranforms in this way because we can't couple width and
height constriants, but we can handle certain rotations.
Fixes#1214
Well, all the easy ones, anyway.
For some reason `// ignore:` isn't working for me so I've disabled
lints that need that. Also disabled those that require a ton of work
(which I'm doing, but not in this PR, to keep it reviewable).
This adds:
- avoid_init_to_null
- library_names
- package_api_docs
- package_names
- package_prefixed_library_names
- prefer_is_not_empty
- sort_constructors_first
- sort_unnamed_constructors_first
- unnecessary_getters_setters
Specifically:
* Handle null styles in TextSpan without crashing in toString().
* Handle null children in TextSpan child lists without crashing in
toString().
* Handle entirely empty TextSpans in toString() explicitly.
* Assert that TextSpans don't contain nulls in various places. This is
done more often than one might think necessary, because it turns out
that TextSpan takes a (mutable) List for one of its arguments, so
who knows what it will contain at any given time. By asserting all
over the place, hopefully we'll catch it near the change if they do
change it.
* Add a RichText example to Stocks to exercise RichText and TextSpans.
See also: https://github.com/flutter/flutter/issues/2514, https://github.com/flutter/flutter/issues/2519
This patch prepares us to pass a BuildContext to RenderObjectWidgets, which
will make it possible to rebuild RenderObjectElements:
* Delay creation of the render object until mount(). That will let us pass
`this` to createRenderObject and have the inherited elements be initialized.
* Cleanup widgets that take builder closures to prepare for their
RenderObjectElement to be rebuilt more often.
* Add a test for the interaction between inherited widgets and
MixedViewport.
Related to #2598
After running a widget test, we now clear out the widget tree and check that we
didn't leak any timers or animations.
Also, fix several bugs that this addtional check revealed.
Fixes#2481
This test causes the buildbot to hang. We don't currently have any hang
protection, which means this test ends up killing the bot. Disable the
test for now why we work on the root issues.
Previously we would elide forward and reverse callbacks that canceled each
other out, which broke the expected state machine. Now we synchronously deliver
status callbacks when start an animation.
Fixes#1913
Also:
- add operator==/hashCode/toString to ViewportDimensions
- add toString to BindingBase
- add toString and debugFillDescription to ScrollBehavior
- fix a bug in the RawGestureDetectorState's replaceGestureRecognizers
- rename MixedViewport's onExtentsUpdate to onExtentChanged
- replace ExtentsUpdateCallback with ValueChanged<double>
- remove a microtask for dispatching scroll start, since it
did not appear to have any purpose
- added dartdocs to Instrumentation until I understood it
- made all event dispatch in Instrumentation drain microtasks
There's no reason to make clients supply a PointerRounter and a
GestureArena when constructing gesture recognizers. These objects are
statics and the gesture recognizers can just grab them directly.
Also, remove the callback constructor arguments. Almost no code used
them. Instead, people seem to prefer using the `..` operator to set
callbacks on the recognizers. Removing the arguments removes a bunch of
boilerplate.