Chromium Code Reviews| 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 6ea4841b268af65a44d1f1d9bef8f5dc8cca0dbe..8e0a5cb462945fa60358f60da2e1eb04fdbfd356 100644 |
| --- a/sky/examples/stocks-fn/lib/stock_app.dart |
| +++ b/sky/examples/stocks-fn/lib/stock_app.dart |
| @@ -14,6 +14,7 @@ import 'package:sky/framework/fn.dart'; |
| import 'package:sky/framework/theme/typography.dart' as typography; |
| import 'stock_data.dart'; |
| import 'stock_list.dart'; |
| +import 'stock_menu.dart'; |
| class StocksApp extends App { |
| @@ -39,6 +40,7 @@ class StocksApp extends App { |
| List<Stock> _sortedStocks; |
| bool _isSearching = false; |
| + bool _isShowingMenu = false; |
| String _searchQuery; |
| StocksApp() : super() { |
| @@ -52,6 +54,13 @@ class StocksApp extends App { |
| }); |
| } |
| + void _handleMenuClick(_) { |
| + print("_handleMenuClick"); |
|
ojan
2015/03/18 02:09:39
Did you mean to leave this in?
abarth-chromium
2015/03/18 02:19:58
Nope!
|
| + setState(() { |
| + _isShowingMenu = !_isShowingMenu; |
| + }); |
| + } |
| + |
| void _handleSearchQueryChanged(query) { |
| setState(() { |
| _searchQuery = query; |
| @@ -116,6 +125,7 @@ class StocksApp extends App { |
| new Icon(key: 'more_white', style: _iconStyle, |
| size: 24, |
| type: 'navigation/more_vert_white') |
| + ..events.listen('gesturetap', _handleMenuClick), |
| ] |
| ); |
| @@ -124,17 +134,19 @@ class StocksApp extends App { |
| var fab = new FloatingActionButton(content: new Icon( |
| type: 'content/add_white', size: 24), level: 3); |
| - return new Container( |
| - key: 'StocksApp', |
| - children: [ |
| - new Container( |
| - key: 'Content', |
| - style: _style, |
| - children: [toolbar, list] |
| - ), |
| - fab, |
| - drawer, |
| - ] |
| - ); |
| + var children = [ |
| + new Container( |
| + key: 'Content', |
| + style: _style, |
| + children: [toolbar, list] |
| + ), |
| + fab, |
| + drawer |
| + ]; |
| + |
| + if (_isShowingMenu) |
| + children.add(new StockMenu()); |
| + |
| + return new Container(key: 'StocksApp', children: children); |
| } |
| } |