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

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

Issue 1033913002: Menu in StocksApp should animate out (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 unified diff | Download patch
« no previous file with comments | « no previous file | sky/framework/animation/animated_value.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 import 'package:sky/framework/components/action_bar.dart'; 5 import 'package:sky/framework/components/action_bar.dart';
6 import 'package:sky/framework/components/drawer.dart'; 6 import 'package:sky/framework/components/drawer.dart';
7 import 'package:sky/framework/components/drawer_header.dart'; 7 import 'package:sky/framework/components/drawer_header.dart';
8 import 'package:sky/framework/components/floating_action_button.dart'; 8 import 'package:sky/framework/components/floating_action_button.dart';
9 import 'package:sky/framework/components/icon.dart'; 9 import 'package:sky/framework/components/icon.dart';
10 import 'package:sky/framework/components/icon_button.dart'; 10 import 'package:sky/framework/components/icon_button.dart';
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 Node build() { 138 Node build() {
139 List<Node> overlays = []; 139 List<Node> overlays = [];
140 140
141 if (_menuController != null) { 141 if (_menuController != null) {
142 overlays.add(new EventTarget( 142 overlays.add(new EventTarget(
143 new StockMenu(controller: _menuController), 143 new StockMenu(controller: _menuController),
144 onGestureTap: (_) { 144 onGestureTap: (_) {
145 // TODO(abarth): We should close the menu when you tap away from the 145 // TODO(abarth): We should close the menu when you tap away from the
146 // menu rather than when you tap on the menu. 146 // menu rather than when you tap on the menu.
147 setState(() { 147 setState(() {
148 _menuController.close(); 148 _menuController.close().then((_) {
149 _menuController = null; 149 setState(() {
150 _menuController = null;
151 });
152 });
150 }); 153 });
151 } 154 }
152 )); 155 ));
153 } 156 }
154 157
155 return new Scaffold( 158 return new Scaffold(
156 header: _isSearching ? buildSearchBar() : buildActionBar(), 159 header: _isSearching ? buildSearchBar() : buildActionBar(),
157 content: new Stocklist(stocks: _stocks, query: _searchQuery), 160 content: new Stocklist(stocks: _stocks, query: _searchQuery),
158 fab: new FloatingActionButton( 161 fab: new FloatingActionButton(
159 content: new Icon(type: 'content/add_white', size: 24), level: 3), 162 content: new Icon(type: 'content/add_white', size: 24), level: 3),
160 drawer: buildDrawer(), 163 drawer: buildDrawer(),
161 overlays: overlays 164 overlays: overlays
162 ); 165 );
163 } 166 }
164 } 167 }
OLDNEW
« 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