We originally wrote examples/fitness to be an app which all
members of the Flutter team could carry on their phones and
use every day. It served us well for testing of Text input,
Keyboards and writing/reading JSON. It's never actually become
a real carry app, so lets just let it go for now.
@abarth @collinjackson
Now we just have one TextSpan class that handles both simple strings, trees of
children, and styling both. This approach simplifies the interface for most
clients.
This patch also removes StyledText, which was weakly typed and tricky to use
correctly. The replacement is RichText, which is strongly typed and uses
TextSpan.
In the dark theme, there isn't really a primary swatch, so this API was
a sandtrap. Instead, be explicit about the colors we need for various
widgets in the theme.
Fixes#1277
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.