2025 Commits

Author SHA1 Message Date
Adam Barth
4b1a9ff14c Remove PointerRouter and GestureArena arguments
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.
2016-02-24 22:23:00 -08:00
Adam Barth
9d4e0e8551 Merge pull request #2142 from abarth/interactive_text
Add the ability to recognize gestures on text spans
2016-02-24 17:32:30 -08:00
Hixie
512b2e1972 Fix move() to call markNeedsLayout().
Otherwise, changing the order of your children (e.g. shuffling a list of
children) will have no visible effect.
2016-02-24 17:10:59 -08:00
Adam Barth
8e326d724a Add the ability to recognize gestures on text spans
Currently the interface for recognizing gestures on text spans is pretty ugly,
but hopefully we can improve it with time.

Fixes #156
2016-02-24 17:07:35 -08:00
Adam Barth
62609669d8 Merge pull request #2141 from abarth/text_span_equals
Fix TextSpan's operator==
2016-02-24 17:04:45 -08:00
Adam Barth
25219277f6 Fix TextSpan's operator==
We forgot to compare the lengths of the lists.
2016-02-24 16:53:22 -08:00
Hixie
0df3730d3e Just-in-time mutations of GestureDetector
This allows us to adjust exactly which gestures we're listening for
during layout, which I'll use to kill a SizeObserver.
2016-02-24 16:18:05 -08:00
Eric Seidel
fbe4cdf5c6 Merge pull request #2129 from eseidelGoogle/space_per_flex
Don't give children negative sizes when overconstrained
2016-02-24 15:30:16 -08:00
Eric Seidel
4e7a9de578 Fix two bugs in Flex exposed by the Game in landscape mode
One bug was masking the other, hence they both needed to be fixed
and tested separately.

@Hixie
2016-02-24 15:30:05 -08:00
Adam Barth
fb4dbf4584 Improve TextSpan
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.
2016-02-24 14:07:10 -08:00
Adam Barth
9e45b85e72 Keep AnimationController's _value in bounds
Rather than clamping _value on read, we now clamp the value when writing it,
which simplifies reasoning about _value.
2016-02-24 12:15:57 -08:00
Hans Muller
ba93987c6e Added bottom_sheet_rebuild_test 2016-02-24 07:49:08 -08:00
Hans Muller
25e22f5648 List Gallery Demo 2016-02-23 15:24:41 -08:00
Hixie
16e7c3a61c Trivial cleanup of getDistanceToBaseline
Turns out we don't need 'parent' outside the assert at all.
2016-02-23 12:56:07 -08:00
Hixie
98d47c3544 Clean up scroll behaviour.
This makes ScrollBehavior agnostic about the kind of scroll.
This also means ExtentScrollBehavior's comment about being linear is
more relevant (previously it was true of all scroll behaviours).
2016-02-23 11:56:37 -08:00
Ian Hickson
7b0e7ee38e Some trivial animation library cleanup. 2016-02-22 14:18:17 -08:00
Adam Barth
2c2fa23886 Remove ThemeData.primarySwatch
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
2016-02-21 20:28:32 -08:00
Adam Barth
1484add104 Add TestGesture
This helper makes it easier to write correct tests that involve
gestures.

Fixes #1855
2016-02-21 14:32:58 -08:00
Adam Barth
aeb9419122 Merge pull request #2064 from abarth/snackbar_action
SnackBar should have a single optional action
2016-02-21 12:58:24 -08:00
Adam Barth
505547ae95 Merge pull request #2068 from abarth/de_material
Remove redundant material_ prefix
2016-02-21 12:58:13 -08:00
Adam Barth
240df79361 Remove redundant material_ prefix
These files are already in the "material" folder. They don't need to be
prefixed with material again.

Fixes #702
2016-02-20 22:12:15 -08:00
Adam Barth
6722e3d516 Animation status callbacks should be re-entrant
We should mutate the status of the AnimationController before calling
the status callbacks so that we're prepared to be re-entered.

Fixes #1911
2016-02-20 22:06:00 -08:00
Adam Barth
72fcbb7d36 SnackBar should have a single optional action
The example in the spec with multiple actions is an anti-example.

Fixes #1876
2016-02-20 16:54:10 -08:00
Adam Barth
4aae718f85 Download sky_engine and sky_services from cloud storage
Downloading these packages from cloud storage simplifies our deployment
story because we can upload to cloud storage automatically from the
buildbot.

This patch also switches the responsibility for downloading the engine
artifacts to update_engine.sh. Centralizing this responsibility ensures
that the packages and the binaries are always in sync.
2016-02-20 13:25:01 -08:00
Hans Muller
f989d3b855 Tooltip gallery demo 2016-02-19 08:27:16 -08:00
Adam Barth
09dbd9e76d Remove ServiceRegistry
We don't need this anymore now that we have Mozart. The engine recently
stopped support it also.
2016-02-18 20:01:10 -08:00
Adam Barth
2087bb08fa Rev engine 2016-02-18 19:47:41 -08:00
Hans Muller
5070d94243 Added GridTile 2016-02-18 16:08:54 -08:00
Hans Muller
8cfe31f5e8 Added GridTileBar, grid gallery demo 2016-02-18 10:13:36 -08:00
P.Y. Laligand
a6c4927b27 Added a few operators to the Velocity class.
#1968
2016-02-17 15:58:19 -08:00
Hans Muller
ec6ed72e6a updated per review feedback 2016-02-17 08:38:40 -08:00
Hans Muller
ba3930cc88 Changed grid layout padding and inter row/column spacing 2016-02-16 16:51:27 -08:00
Adam Barth
7c105e6b2a Merge pull request #1928 from abarth/move_to_up
Enforce that we get a final move to the pointer up location
2016-02-16 15:45:47 -08:00
Adam Barth
ddd58c5e23 Enforce that we get a final move to the pointer up location
Previously we asserted that we got a pointer move to the location where the
pointer up occured, but not all sources of pointer packets respect that
invariant. Specifically, on the iOS simulator, of you drag outside the window,
you'll get a stream of pointers that violates that invariant.

This patch teaches the converter to insert a PointerMoveEvent to move the
pointer to the location where the up occurs, repairing the invariant.

Fixes #1912
2016-02-16 14:58:40 -08:00
Adam Barth
6a9de1d735 Add docs for RepaintBoundary 2016-02-16 13:41:44 -08:00
Adam Barth
302640a391 Improve the sample code for createState
The previous sample code isn't a common (or recommended) pattern.
2016-02-16 11:09:23 -08:00
Adam Barth
4408c820e1 Rename AutoLayoutParams to AutoLayoutRect
This object represents a rect the auto-layout system.
2016-02-15 16:29:27 -08:00
Adam Barth
c7d71d8ab1 Simplify the AutoLayout API
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.
2016-02-15 15:25:21 -08:00
Adam Barth
262dd7a63b Add support for autolayout to widgets
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.
2016-02-15 03:01:40 -08:00
Adam Barth
2bb268492c Improve checkbox animation
This patch improves the checkbox animation as suggested by the design
team. The color transition now occurs earlier in the animation and there
are fewer components to the animation.

Fixes #1614
2016-02-14 18:01:15 -08:00
Ian Hickson
aa41783ae3 Merge pull request #1877 from Hixie/onPressed-disabled
Document the onPressed/disabled behavior.
2016-02-14 13:57:42 -08:00
Ian Hickson
8ff177f832 Document the onPressed/disabled behavior.
Fixes https://github.com/flutter/flutter/issues/1331

Hopefully this will be enough to start with. If this continues to be a
point of confusion we can see about adding more documentation or
changing the API somehow.
2016-02-14 11:06:11 -08:00
Ian Hickson
86366626f0 Merge pull request #1873 from Hixie/debugFillDescription
Rename debugDescribeSettings to debugFillDescription.
2016-02-14 11:05:31 -08:00
Ian Hickson
0334a833ef Rename debugDescribeSettings to debugFillDescription.
...so that it's easier to copy/paste between the rendering and settings layers.
2016-02-13 23:23:45 -08:00
Adam Barth
4fb47600e4 Add a Velocity class to be explicit about units
We were using an Offset, which represented pixels/second, but it wasn't
clear to clients whether that was pixels/ms. Now we use a Velocity class
that is explict about the units.

Fixes #1510
Fixes #785
2016-02-13 22:59:09 -08:00
Ian Hickson
ae178800d5 Merge pull request #1870 from Hixie/image
Use Image.toString instead of rolling our own each time
2016-02-13 19:51:40 -08:00
Ian Hickson
f54b8ad510 Use Image.toString instead of rolling our own each time
I meant to check this in as part of https://github.com/flutter/flutter/pull/1852
but forgot to commit the local change, d'oh.
2016-02-13 17:54:10 -08:00
Ian Hickson
00285bf2b2 Merge pull request #1852 from Hixie/stock-icons
Fix color of icons in drawers in dark theme.
2016-02-13 17:26:10 -08:00
Ian Hickson
b3d964145f Disable flakey test.
See https://github.com/flutter/flutter/issues/1854
2016-02-13 17:11:39 -08:00
Ian Hickson
3eb1b412e0 Fix color of icons in drawers in dark theme.
This makes it match the material spec more.
https://www.google.com/design/spec/style/icons.html

Fixes https://github.com/flutter/flutter/issues/1357
2016-02-13 17:10:10 -08:00