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

Unified Diff: sky/sdk/lib/widgets/animated_component.dart

Issue 1223073002: AnimatedContainer: generalized Container widget that handles animating values (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/lib/widgets/animated_component.dart
diff --git a/sky/sdk/lib/widgets/animated_component.dart b/sky/sdk/lib/widgets/animated_component.dart
index af088f846434d415523be11d13d2aaef0ef8bb14..cfd79f4054e9307d0f667555fc035c87b914fb4b 100644
--- a/sky/sdk/lib/widgets/animated_component.dart
+++ b/sky/sdk/lib/widgets/animated_component.dart
@@ -4,11 +4,7 @@
import 'dart:async';
-import 'package:vector_math/vector_math.dart';
-
import '../animation/animated_value.dart';
-import '../animation/animation_performance.dart';
-import '../animation/curves.dart';
import 'basic.dart';
class _AnimationEntry {
@@ -54,22 +50,3 @@ abstract class AnimatedComponent extends StatefulComponent {
}
}
-
-// Types of things that can be animated in a component. Use build() to
-// construct the final Widget based on the animation state.
-// TODO(mpcomplete): the idea here is to eventually have an AnimatedCollection
-// which assembles a container based on a list of animated things. e.g. if you
-// want to animate position, opacity, and shadow, you add those animators to an
-// AnimatedCollection and just call collection.build() to construct your
-// widget.
-
-class AnimatedPosition extends AnimatedType<Point> {
- AnimatedPosition(Point begin, Point end, {Curve curve: linear})
- : super(begin, end, curve: curve);
-
- Widget build(Widget child) {
- Matrix4 transform = new Matrix4.identity();
- transform.translate(value.x, value.y);
- return new Transform(transform: transform, child: child);
- }
-}

Powered by Google App Engine
This is Rietveld 408576698