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

Unified Diff: sky/sdk/lib/animation/animation_performance.dart

Issue 1231893006: Update ink splash to new animation system (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: less final 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
« no previous file with comments | « no previous file | sky/sdk/lib/widgets/ink_well.dart » ('j') | sky/sdk/lib/widgets/ink_well.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 829f9e55ad8ddba46d3df9965d73bc4e0923db21..a9e89af7523a5f050e0c08026acdce414672a90d 100644
--- a/sky/sdk/lib/animation/animation_performance.dart
+++ b/sky/sdk/lib/animation/animation_performance.dart
@@ -12,18 +12,21 @@ abstract class AnimatedVariable {
}
class AnimatedType<T extends dynamic> extends AnimatedVariable {
- T value;
- T begin, end;
- final Curve curve;
-
AnimatedType(this.begin, {this.end, this.curve: linear}) {
- value = begin;
+ _value = begin;
}
+ T begin;
+ T end;
+ Curve curve;
+
+ T _value;
+ T get value => _value;
+
void setFraction(double t) {
if (end != null) {
// TODO(mpcomplete): Reverse the timeline and curve.
- value = begin + (end - begin) * curve.transform(t);
+ _value = begin + (end - begin) * curve.transform(t);
}
}
}
« no previous file with comments | « no previous file | sky/sdk/lib/widgets/ink_well.dart » ('j') | sky/sdk/lib/widgets/ink_well.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698