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

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

Issue 1226263003: Break dependency of AnimationPerformance on AnimatedValue (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: remove unused import 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 | « sky/sdk/lib/widgets/animated_component.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/lib/widgets/drawer.dart
diff --git a/sky/sdk/lib/widgets/drawer.dart b/sky/sdk/lib/widgets/drawer.dart
index ca4f9de1416844fdcffb3336f96cfabfc04bf20a..e33b8acdca5964365fa1c2e589dfe6a6a5979549 100644
--- a/sky/sdk/lib/widgets/drawer.dart
+++ b/sky/sdk/lib/widgets/drawer.dart
@@ -38,8 +38,8 @@ class DrawerController {
DrawerController(this.onStatusChange) {
performance = new AnimationPerformance()
..duration = new Duration(milliseconds: _kBaseSettleDurationMS)
- ..variable = position;
- performance.timeline.onValueChanged.listen(_checkValue);
+ ..variable = position
+ ..addListener(_checkValue);
}
final DrawerStatusChangeHandler onStatusChange;
@@ -48,7 +48,7 @@ class DrawerController {
new Point(-_kWidth, 0.0), Point.origin, curve: _kAnimationCurve);
bool _oldClosedState = true;
- void _checkValue(_) {
+ void _checkValue() {
var newClosedState = isClosed;
if (onStatusChange != null && _oldClosedState != newClosedState) {
onStatusChange(!newClosedState);
@@ -101,7 +101,7 @@ class Drawer extends AnimatedComponent {
this.children,
this.level: 0
}) : super(key: key) {
- watch(controller.performance.timeline);
+ watchPerformance(controller.performance);
}
List<Widget> children;
« no previous file with comments | « sky/sdk/lib/widgets/animated_component.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698