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

Unified Diff: sky/examples/stocks-fn/lib/stock_app.dart

Issue 1016093002: Begin work on the PopupMenu entrance animation (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 | « no previous file | sky/framework/animation/animated_value.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/examples/stocks-fn/lib/stock_app.dart
diff --git a/sky/examples/stocks-fn/lib/stock_app.dart b/sky/examples/stocks-fn/lib/stock_app.dart
index e17c308a55c00b3f7a656c81a7f16626f249f3f4..14f2e6a741d340b2867c69d471a749c59434f5c0 100644
--- a/sky/examples/stocks-fn/lib/stock_app.dart
+++ b/sky/examples/stocks-fn/lib/stock_app.dart
@@ -18,7 +18,7 @@ import 'stock_menu.dart';
class StocksApp extends App {
- DrawerAnimation _drawerAnimation = new DrawerAnimation();
+ DrawerController _DrawerController = new DrawerController();
static Style _style = new Style('''
display: flex;
@@ -68,7 +68,7 @@ class StocksApp extends App {
Node build() {
var drawer = new Drawer(
- animation: _drawerAnimation,
+ controller: _DrawerController,
level: 3,
children: [
new DrawerHeader(
@@ -112,7 +112,7 @@ class StocksApp extends App {
new Icon(key: 'menu', style: _iconStyle,
size: 24,
type: 'navigation/menu_white')
- ..events.listen('gesturetap', _drawerAnimation.toggle),
+ ..events.listen('gesturetap', _DrawerController.toggle),
new Container(
style: _titleStyle,
children: [title]
@@ -143,8 +143,13 @@ class StocksApp extends App {
drawer
];
- if (_isShowingMenu)
- children.add(new StockMenu());
+ if (_isShowingMenu) {
+ children.add(new StockMenu()..events.listen('gesturetap', (_) {
+ setState(() {
+ _isShowingMenu = false;
+ });
+ }));
+ }
return new Container(key: 'StocksApp', children: children);
}
« no previous file with comments | « no previous file | sky/framework/animation/animated_value.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698