Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Unified Diff: sky/sdk/example/widgets/card_collection.dart

Issue 1226263003: Break dependency of AnimationPerformance on AnimatedValue (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: sky/sdk/example/widgets/card_collection.dart
diff --git a/sky/sdk/example/widgets/card_collection.dart b/sky/sdk/example/widgets/card_collection.dart
index 94c0443830d764b241ba9d10a522da14d87df1d4..aaca1d47ce12d3745982856b3f3363c34d190a39 100644
--- a/sky/sdk/example/widgets/card_collection.dart
+++ b/sky/sdk/example/widgets/card_collection.dart
@@ -29,8 +29,8 @@ class CardCollectionApp extends App {
CardCollectionApp() {
_activeCardAnimation = new AnimationPerformance()
..variable = new AnimatedType(0.0, 1.0)
- ..duration = new Duration(milliseconds: _kCardDismissFadeoutMS);
- _activeCardAnimation.timeline.onValueChanged.listen(_handleAnimationProgressChanged);
+ ..duration = new Duration(milliseconds: _kCardDismissFadeoutMS)
+ ..addListener(_handleAnimationProgressChanged);
}
int _activeCardIndex = -1;
@@ -46,7 +46,7 @@ class CardCollectionApp extends App {
return _activeCardAnimation.progress * _activeCardWidth * _kDismissCardThreshold;
}
- void _handleAnimationProgressChanged(_) {
+ void _handleAnimationProgressChanged() {
setState(() {
if (_activeCardAnimation.isCompleted && !_activeCardDragUnderway)
_dismissedCardIndices.add(_activeCardIndex);

Powered by Google App Engine
This is Rietveld 408576698