20087 Commits

Author SHA1 Message Date
Adam Barth
ac9aced746 Simplify Scrollable animations
Rather than having two objects driving scrolling animations, we now have one
object, a Timeline, drive both scrollTo and fling animations. Using Timeline
instead of AnimatedSimulation paves the way to removing AnimatedSimulation
(which is now used only inside the animation library).

Finally, this patch also simplifies (and makes private) _TweenSimulation by
using AnimatedValue to do the math.
2015-10-03 14:08:20 -07:00
Mehmet Akin
9f6d39a0ce Fix indent. 2015-10-03 22:56:30 +02:00
Adam Barth
9a60f4e129 Make Ticker start ticking at zero Duration
The only client wants a zero-based duration.
2015-10-03 13:48:57 -07:00
Adam Barth
75d4ee7eb6 Switch scheduler over to Duration
This patch prepares us to switch to using integers when handing off the
animation time from the engine to the framework.
2015-10-03 13:48:57 -07:00
Adam Barth
cccb59dfb6 Merge pull request #1474 from abarth/hit_zero
Force AnimatedVariables to hit begin on 0.0
2015-10-03 13:48:33 -07:00
Adam Barth
6c72e52d7a Force AnimatedVariables to hit begin on 0.0
We already forced hitting end on 1.0.

Fixes #1358
2015-10-03 13:41:20 -07:00
Mehmet Akin
9c7b2ea79b Simplfy resetting board and mine generation. 2015-10-03 22:22:30 +02:00
Adam Barth
44dbe3c77d Merge pull request #1476 from abarth/ink_well_gestures
RenderInkWell should use gestures
2015-10-03 12:53:03 -07:00
Adam Barth
e5d34d9338 RenderInkWell should use gestures
After this patch, InkWell is driven by gesture recognizers, which lets us
cleanly cancel splashes when the user actually scrolls.

I've also refactored all the clients of InkWell to use InkWell to detect
gestures instead of wrapping InkWell in a GestureDetector.

Fixes #1271
2015-10-03 12:49:34 -07:00
Adam Barth
46a285fe42 Merge pull request #1477 from abarth/less_clever
Be a bit less clever with ??=
2015-10-03 01:41:09 -07:00
Adam Barth
66d7ffbb63 Be a bit less clever with ??=
Turns out .. binds tigher than ??= according to
https://www.dartlang.org/docs/dart-up-and-running/ch02.html#operators, which
means we were only updating the callbacks when we first created the
recognizers. Now we update them unconditionally.
2015-10-03 01:37:01 -07:00
Adam Barth
aab0424b6d Merge pull request #1475 from abarth/gesture_style
Clean up some style in GestureDetector
2015-10-02 23:54:27 -07:00
Adam Barth
bad67144f3 Clean up some style in GestureDetector
* Rename GestureTapListener (and friends) To GestureTapCallback to match the
   other gesture callbacks.
 * Replace "ensureFoo" pattern with ??= operator.
2015-10-02 23:50:23 -07:00
Adam Barth
9bff9ef9d8 Merge pull request #1473 from abarth/super_style
Use `}) : super` consistently
2015-10-02 23:15:11 -07:00
Adam Barth
7b230cd127 Use }) : super consistently
Fixes #1372
2015-10-02 23:12:03 -07:00
Adam Barth
36c4e6e1fc Merge pull request #1458 from Hixie/dismiss-1215
Regression test for #1215
2015-10-02 23:05:57 -07:00
Adam Barth
463fdec361 Merge pull request #1467 from Hixie/app-help
Assert that App(routes) is not null.
2015-10-02 23:05:39 -07:00
Kris Giesing
9f857d7215 Fix #1471 Add double tap gesture 2015-10-02 18:49:38 -07:00
Hans Muller
f6ed436a22 Merge pull request #1469 from HansMuller/mask
ShaderMask

The ShaderMask widget enables rendering its child with an alpha channel defined by a Shader. For example if the Shader was a linear gradient in alpha then the component behind the ShaderMask's child would appear wherever the gradient's alpha value was not fully opaque.

The card_collection.dart example demonstrates this. Select the "Let the sun shine" checkbox in the app's drawer.
2015-10-02 17:11:39 -07:00
Hans Muller
c985ed6739 ShaderMask
The ShaderMask widget enables rendering its child with an alpha channel defined by a Shader. For example if the Shader was a linear gradient in alpha then the component behind the ShaderMask's child would appear wherever the gradient's alpha value was not fully opaque.

The card_collection.dart example demonstrates this. Select the "Let the sun shine" checkbox in the app's drawer.
2015-10-02 17:08:00 -07:00
Adam Barth
5fb5f1cdda Merge pull request #1463 from abarth/animated_container
Add AnimatedContainer
2015-10-02 16:34:32 -07:00
Adam Barth
1ba0fcf864 Add AnimatedContainer
This widget is used in Material and Drawer. We don't currently support
animating towards null, but we can add that in a future patch.
2015-10-02 15:53:12 -07:00
Adam Barth
0b934fbbd4 Merge pull request #1468 from abarth/pan_crash
Detecting just Pan events causes an exception in GestureDetector
2015-10-02 15:45:21 -07:00
Adam Barth
8697a27c1a Detecting just Pan events causes an exception in GestureDetector
Fixes #1320
2015-10-02 15:36:41 -07:00
Hixie
65ce815dd4 Assert that App(routes) is not null.
This is probably a sign that you're using fn2 still.
2015-10-02 15:28:07 -07:00
Viktor Lidholt
d1b0841802 Merge pull request #1465 from vlidholt/master
First pass on sprite physics
2015-10-02 15:21:27 -07:00
Viktor Lidholt
4a7e6e9bcf Updates work with latest Flutter changes 2015-10-02 15:10:02 -07:00
Chinmay Garde
41b3bd862c Merge pull request #1461 from chinmaygarde/master2
Update Dart revision to address iOS build break
2015-10-02 14:25:26 -07:00
Chinmay Garde
a52ce4f8de Update Dart revision to address iOS build break 2015-10-02 14:23:02 -07:00
Viktor Lidholt
b3dc369bd0 Sprite physics, first iteration 2015-10-02 14:15:14 -07:00
Ian Hickson
e8b4da5b42 Merge pull request #1455 from Hixie/heroes2
Groundwork for heroes transition in Stocks app
2015-10-02 11:24:06 -07:00
Hixie
4a748f3a27 Regression test for #1215
I'm not sure this specific incarnation of the test ever crashed, since
the original test depended on user interaction and now works fine, but
just in case, here's a regression test for it so I can close that issue.

This also slightly changes the Widget.toString() output to include the
key since that will make debugging easier.
2015-10-02 11:22:16 -07:00
Ian Hickson
5aa531fdd5 Merge pull request #1453 from Hixie/size-null
Default RenderBox.size to null.
2015-10-02 10:34:06 -07:00
Hixie
e41c4ce807 Default RenderBox.size to null. 2015-10-02 10:31:14 -07:00
Hixie
68f0b69bd0 Groundwork for heroes transition in Stocks app
Identify specific parts of a Stock row with a Global Key that can be
regenerated later, and pass that key back to event handlers so they can
use them to do the transition.
2015-10-02 10:20:08 -07:00
Andrew Wilson
4be4dafaae Merge pull request #1448 from apwilson/curve
Add fast-out-slow-in Material-Design-style curve.
2015-10-01 17:19:38 -07:00
Ian Hickson
d35e4a4585 Merge pull request #1449 from Hixie/drag-offset
Draggable offsets and fix default drag feedback
2015-10-01 17:13:18 -07:00
Adam Barth
9ca76ed463 Merge pull request #1447 from abarth/reactivate
GlobalKeys should preserve state across tree mutations
2015-10-01 17:13:16 -07:00
Hixie
d726c2780d Draggable offsets and fix default drag feedback
You can now set an offset that will be used for the hit testing for
drops. (It doesn't move the feedback by default; use a Transform for
that.) I also made the default feedback not be Opacity 0.5 always.
2015-10-01 17:13:03 -07:00
Ian Hickson
8163413130 Merge pull request #1446 from Hixie/fractionally_sized_box
FractionallySizedBox
2015-10-01 17:12:13 -07:00
Adam Barth
be47876e93 GlobalKeys should preserve state across tree mutations
This patch causes widgets with global keys to drag their state (including their
children) with them as they travel through the element tree.
2015-10-01 17:08:05 -07:00
Andrew Wilson
9b1c3e6451 Add fast-out-slow-in Material-Design-style curve. 2015-10-01 16:46:51 -07:00
Adam Barth
60553b49c4 Rev pub package 2015-10-01 15:47:01 -07:00
Adam Barth
6b269e21e5 Rev pub package 2015-10-01 15:44:54 -07:00
Hixie
d43e274247 FractionallySizedBox 2015-10-01 15:41:14 -07:00
Adam Barth
55481ed387 Merge pull request #1444 from abarth/float64
Moves from vector_math to vector_math_64
2015-10-01 15:37:20 -07:00
Ian Hickson
6f320a476d Merge pull request #1445 from Hixie/core-types
EdgeDims changes and other fixes to core classes.
2015-10-01 15:37:04 -07:00
Hixie
3e0c6d586e EdgeDims changes and other fixes to core classes.
- Rename EdgeDims constructor to EdgeDims.TRBL().

- Add operator== to Size and Offset so that you can compare Size to
  DebugSize in checked mode.

- Add Size.lerp().

- Add various operators to EdgeDims. (*, /, ~/, %)

- Add EdgeDims.lerp().

- Update style guide. I went there to fix an EdgeDims constructor
  example, and stayed because some recent things came up and I wanted to
  add them before I forgot.
2015-10-01 15:34:04 -07:00
Adam Barth
8cf43b65d2 Moves from vector_math to vector_math_64
* Moves from vector_math to vector_math_64
* Adds support for Float64List in Dart bindings
2015-10-01 14:46:13 -07:00
Adam Barth
1270a15001 Merge pull request #1441 from abarth/delay_finalization
Delay unmounting elements until the end of the frame
2015-10-01 14:43:07 -07:00