Remove Performance and AnimatedValue

This patch removes Performance and AnimationValue now that we've ported the
framework over to AnimationController and Tween. This patch also cleans up the
names of the AnimationController classes now that they don't have to avoid
conflicts with the old animation API. Specifically, I've made the following
renames:

 * Animated -> Animation
 * Evaluatable -> Animatable
 * PerformanceStatus -> AnimationStatus

This patch is just renames and moving code around. There aren't any changes in
behavior.
This commit is contained in:
Adam Barth
2016-01-20 13:47:18 -08:00
parent e459e7124a
commit b988a875ad
35 changed files with 528 additions and 1503 deletions

View File

@@ -21,13 +21,13 @@ class _ProgressIndicatorDemoState extends State<ProgressIndicatorDemo> {
parent: controller,
curve: new Interval(0.0, 0.9, curve: Curves.ease),
reverseCurve: Curves.ease
)..addStatusListener((PerformanceStatus status) {
if (status == PerformanceStatus.dismissed || status == PerformanceStatus.completed)
)..addStatusListener((AnimationStatus status) {
if (status == AnimationStatus.dismissed || status == AnimationStatus.completed)
reverseValueAnimationDirection();
});
}
Animated<double> animation;
Animation<double> animation;
AnimationController controller;
void handleTap() {

View File

@@ -33,10 +33,10 @@ class CardTransition extends StatelessComponent {
});
final Widget child;
final Animated<double> animation;
final Evaluatable<double> x;
final Evaluatable<double> opacity;
final Evaluatable<double> scale;
final Animation<double> animation;
final Animatable<double> x;
final Animatable<double> opacity;
final Animatable<double> scale;
Widget build(BuildContext context) {
return new AnimatedBuilder(
@@ -63,7 +63,7 @@ class SmoothBlockState extends State<SmoothBlock> {
double _height = 100.0;
Widget _handleEnter(Animated<double> animation, Widget child) {
Widget _handleEnter(Animation<double> animation, Widget child) {
return new CardTransition(
x: new Tween<double>(begin: -200.0, end: 0.0),
opacity: new Tween<double>(begin: 0.0, end: 1.0),
@@ -73,7 +73,7 @@ class SmoothBlockState extends State<SmoothBlock> {
);
}
Widget _handleExit(Animated<double> animation, Widget child) {
Widget _handleExit(Animation<double> animation, Widget child) {
return new CardTransition(
x: new Tween<double>(begin: 0.0, end: 200.0),
opacity: new Tween<double>(begin: 1.0, end: 0.0),