This patch makes it easier to use the auto layout API:
* We no longer use operator== because that requires an ugly cast by the
API user.
* Also, "leftEdge" is now just "left" for less verbosity.
* AutoLayoutChild not implies its key from the AutoLayoutParam object.
* We now correctly layout every child of a RenderAutoLayout object even
if the solver doesn't flush any updates to that child.
This patch teaches the widget framework how to use Cassowary-based
autolayout. To integrate autolayout with widgets, I had to refactor how
RenderAutoLayout worked a bit. Now RenderAutoLayout follows the same
delegate pattern we use for custom paint and custom layout.
Previously, hello_world.dart was an interactive circle. I've moved that
to touch_input.dart. We should eventually harmonize the touch input
examples at all the layers.
Remove the SizeObserver you need to use snap alignment in lists by
having the lists provide the size themselves in the callback.
Also, remove snapAlignmentOffset since we couldn't figure out how to
explain it and it's not really needed.
This lets it cooperate with other gestures like tap.
The way I implemented this was to refactor the entire Draggable gesture
logic to use a new kind of gesture detector called
MultiDragGestureRecognizer. It works a bit like
MultiTapGestureRecognizer but for drags.
Also some tweaks to the velocity estimator.
Each layer is supposed to reexport the parts of the previous layer
that are part of its API.
- In painting.dart, export from dart:ui all the Canvas-related APIs
that make sense to be used at higher levels, e.g. PaintingStyle.
- Delete painting/shadows.dart. It was dead code.
- In rendering/object.dart, export all of painting.dart.
- In widgets/basic.dart, export all of painting.dart and
animation.dart. Some classes in animation/ are renamed to make this
less disruptive and confusing to the namespace.
- Split out Stocks back into an import model rather than a part model,
so that it's easier to manage its dependencies on a per-file basis.
- Move Ticker to scheduler library.
- Remove as many redundant imports as possible now.
- Some minor nit picking cleanup in various files.
Negative constraints never make sense, so catch those too.
Make RenderObject.layout's isNormalized assert use the newer more fancy
debug version of isNormalized.
* Use actual exceptions rather than assertions containing code
containing strings when trying to give messages to authors.
* Introduce RenderingError which is an AssertionError that takes a
string argument, to support the above.
* Provide a BoxDimensions.hasBoundedWidth/hasBoundedHeight API.
* Document BoxDimensions.isNormalized.
* Provide more useful information when we assert isNormalized and find
that it is false.
* When finding the size is infinite, crawl the tree to figure out which
render box is likely responsible for the infinite constraints.
* Provide more information when size doesn't match the constraints.
* Provide more information when intrinsic dimension methods violate the
constraints.
* Only spam a huge amount of information for the first exception from
the rendering library. I've noticed a lot of people looking at the
last exception printed rather than the first and that's very
misleading -- after the rendering library hits an exception, all bets
are off regarding what'll happen in the future. All kinds of asserts
might fire.
* Improve docs around the debug methods and flags for the above.
* Make Block default to have no children. Previously, giving no children
crashed with a confusing message about a null deref in an assert.