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

Unified Diff: sky/framework/components/drawer.dart

Issue 1007893005: Clean up stock_app.dart (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 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/framework/components/action_bar.dart ('k') | sky/framework/components/icon.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/framework/components/drawer.dart
diff --git a/sky/framework/components/drawer.dart b/sky/framework/components/drawer.dart
index 20045479735374bf1f554ac20f468f3f43cb9511..78b61b968a5bd89251ac9a57fc04961b546e1c85 100644
--- a/sky/framework/components/drawer.dart
+++ b/sky/framework/components/drawer.dart
@@ -22,6 +22,8 @@ const Curve _kAnimationCurve = parabolicRise;
class DrawerController {
final AnimatedValue position = new AnimatedValue(-_kWidth);
+ bool get isClosed => position.value == -_kWidth;
+
bool get _isMostlyClosed => position.value <= -_kWidth / 2;
void toggle(_) => _isMostlyClosed ? _open() : _close();
« no previous file with comments | « sky/framework/components/action_bar.dart ('k') | sky/framework/components/icon.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698