14 Commits

Author SHA1 Message Date
Ian Hickson
9e673853e5 Turn off AnimationControllers when not in use (#5902)
This requires all AnimationController objects to be given a
TickerProvider, a class that can create the Ticker.

It also provides some nice mixins for people who want to have their
State provide a TickerProvider. And a schedulerTickerProvider for those
cases where you just want to see your battery burn.

Also, we now enforce destruction order for elements.
2016-09-26 10:57:10 -07:00
Dragoș Tiselice
691c25faca Renamed Step curve to Threshold. (#5755)
In the interest of using the name in the case of Material steppers,
this commit renames Step curve to Threshold.
2016-09-07 13:58:04 -07:00
Jason Simmons
f8a80b1da6 Notify a Scrollable that the associated animation has stopped (#5209)
This also required changing the AnimationController state transition
logic to signal completion of the animation during the tick that
finishes the simulation.

Fixes https://github.com/flutter/flutter/issues/3675
2016-08-04 10:26:35 -07:00
Adam Barth
9850fe1861 Test all but one line in animation.dart (#4751)
The one line we don't test is the private constructor for the Curves class,
which exists to ensure that no one constructs the Curves class.
2016-06-24 16:33:04 -07:00
Adam Barth
46da9e8498 Add a simple way of merging coverage data (#4726)
`flutter test` now has a `--merge-coverage` flag that can be used to merge
coverage data from previous runs, enabling faster iteration cycles.
2016-06-23 18:02:55 -07:00
Adam Barth
05eef4a9b2 Get to 100% test coverage for src/animation/animations.dart (#4721) 2016-06-23 15:15:31 -07:00
Adam Barth
56039c0e64 Improve test coverage for animation.dart (#4718)
We now have 100% coverage of animation.dart and animation_controller.dart.
Also, add some basic tools for working with lcov files. These tools need much
more polish.
2016-06-23 13:43:42 -07:00
Adam Barth
73cd70f776 Add test coverage for lastElapsedDuration (#4705)
Also, fix the bug where apps would assert when you change the time dilation.
Use that mechanism to fix the animation controller tests.
2016-06-22 17:14:55 -07:00
Adam Barth
053df166c4 AnimationController.fling should respect upper and lower bounds (#4533)
Instead of flinging to between 0.0 and 1.0, we should adapt the default
spring to the controller's upper and lower bounds.

Fixes #3545
2016-06-13 11:32:13 -07:00
pq
8bc06aa9b3 More type annotations for literals.
The `flutter` package gets more types!

Follow-up from: https://github.com/flutter/flutter/pull/3727.
2016-05-04 10:10:08 -07:00
Ian Hickson
e968d91ca4 Rename binding abstract classes (#3482)
The old names were getting silly and started stepping on valuable namespace.

The new names are consistent and clear.
2016-04-21 17:18:46 -07:00
Adam Barth
c51ae28d87 Add "form" parameter to AnimationController forward and reverse
Fixes #2324
2016-03-02 12:05:16 -08:00
Adam Barth
25ab5555b7 Elide fewer AnimationStatus callbacks
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
2016-02-26 16:29:14 -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