Merge pull request #597 from mpcomplete/value.animation

Add a ValueAnimation helper class for AnimationPerfomance.
This commit is contained in:
mpcomplete
2015-08-14 12:03:27 -04:00
4 changed files with 30 additions and 17 deletions

View File

@@ -38,7 +38,7 @@ class EnsureVisibleApp extends App {
List<CardModel> cardModels;
BlockViewportLayoutState layoutState = new BlockViewportLayoutState();
ScrollListener scrollListener;
AnimationPerformance scrollAnimation;
ValueAnimation<double> scrollAnimation;
void initState() {
List<double> cardHeights = <double>[
@@ -51,7 +51,7 @@ class EnsureVisibleApp extends App {
return new CardModel(i, cardHeights[i], color);
});
scrollAnimation = new AnimationPerformance()
scrollAnimation = new ValueAnimation<double>()
..duration = const Duration(milliseconds: 200)
..variable = new AnimatedValue<double>(0.0, curve: ease);