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

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

Issue 1233703003: add initState, rename animated_container (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: remove print statement 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/drawer.dart
diff --git a/sky/sdk/lib/widgets/drawer.dart b/sky/sdk/lib/widgets/drawer.dart
index e64974a6d026de1cb135226a2c9879bd7e14a76e..c53bd79bfb9685a6c958c5ee933a13fa4eb345ab 100644
--- a/sky/sdk/lib/widgets/drawer.dart
+++ b/sky/sdk/lib/widgets/drawer.dart
@@ -8,7 +8,7 @@ import '../animation/animation_performance.dart';
import '../animation/curves.dart';
import '../theme/shadows.dart';
import 'animated_component.dart';
-import 'animated_container.dart';
+import 'animation_builder.dart';
import 'basic.dart';
import 'theme.dart';
@@ -37,19 +37,19 @@ typedef void DrawerStatusChangeHandler (bool showing);
class DrawerController {
DrawerController(this.onStatusChange) {
- container = new AnimatedContainer()
+ builder = new AnimationBuilder()
..position = new AnimatedType<Point>(
new Point(-_kWidth, 0.0), end: Point.origin, curve: _kAnimationCurve);
- performance = container.createPerformance([container.position],
+ performance = builder.createPerformance([builder.position],
duration: _kBaseSettleDuration)
..addListener(_checkValue);
}
final DrawerStatusChangeHandler onStatusChange;
AnimationPerformance performance;
- AnimatedContainer container;
+ AnimationBuilder builder;
- double get xPosition => container.position.value.x;
+ double get xPosition => builder.position.value.x;
bool _oldClosedState = true;
void _checkValue() {
@@ -132,7 +132,7 @@ class Drawer extends AnimatedComponent {
onGestureTap: controller.handleMaskTap
);
- Widget content = controller.container.build(
+ Widget content = controller.builder.build(
new Container(
decoration: new BoxDecoration(
backgroundColor: Theme.of(this).canvasColor,

Powered by Google App Engine
This is Rietveld 408576698