| Index: sky/sdk/lib/animation/animation_performance.dart
|
| diff --git a/sky/sdk/lib/animation/animation_performance.dart b/sky/sdk/lib/animation/animation_performance.dart
|
| index d6d9edc1f8fc268c630c6fd64fb9fab5f85b5bf4..50f9c8a2368a994553009f846ed62f0701466cc7 100644
|
| --- a/sky/sdk/lib/animation/animation_performance.dart
|
| +++ b/sky/sdk/lib/animation/animation_performance.dart
|
| @@ -60,11 +60,11 @@ class AnimationPerformance {
|
| bool get isCompleted => progress == 1.0;
|
| bool get isAnimating => timeline.isAnimating;
|
|
|
| - void play() {
|
| - _animateTo(1.0);
|
| + void play({ Duration delay: Duration.ZERO }) {
|
| + _animateTo(1.0, delay: delay);
|
| }
|
| - void reverse() {
|
| - _animateTo(0.0);
|
| + void reverse({ Duration delay: Duration.ZERO }) {
|
| + _animateTo(0.0, delay: delay);
|
| }
|
|
|
| void stop() {
|
| @@ -99,11 +99,14 @@ class AnimationPerformance {
|
| listener();
|
| }
|
|
|
| - void _animateTo(double target) {
|
| + void _animateTo(double target, { Duration delay }) {
|
| + assert(delay != null);
|
| double remainingDistance = (target - timeline.value).abs();
|
| timeline.stop();
|
| - if (remainingDistance != 0.0)
|
| - timeline.animateTo(target, duration: remainingDistance * duration.inMilliseconds);
|
| + if (remainingDistance != 0.0) {
|
| + timeline.animateTo(target, duration: remainingDistance * duration.inMilliseconds,
|
| + delay: delay.inMilliseconds.toDouble());
|
| + }
|
| }
|
|
|
| void _tick(double t) {
|
|
|