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

Side by Side Diff: sky/sdk/example/stocks/lib/stock_home.dart

Issue 1237213003: Wire up popup menus to back button (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: rebase 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 unified diff | Download patch
« no previous file with comments | « no previous file | sky/sdk/example/stocks/lib/stock_menu.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/editing/input.dart'; 5 import 'package:sky/editing/input.dart';
6 import 'package:sky/animation/animation_performance.dart'; 6 import 'package:sky/animation/animation_performance.dart';
7 import 'package:sky/widgets/animated_component.dart'; 7 import 'package:sky/widgets/animated_component.dart';
8 import 'package:sky/widgets/animation_builder.dart'; 8 import 'package:sky/widgets/animation_builder.dart';
9 import 'package:sky/theme/colors.dart' as colors; 9 import 'package:sky/theme/colors.dart' as colors;
10 import 'package:sky/widgets/basic.dart'; 10 import 'package:sky/widgets/basic.dart';
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 return widget; 299 return widget;
300 } 300 }
301 301
302 void addMenuToOverlays(List<Widget> overlays) { 302 void addMenuToOverlays(List<Widget> overlays) {
303 if (_menuStatus == PopupMenuStatus.inactive) 303 if (_menuStatus == PopupMenuStatus.inactive)
304 return; 304 return;
305 overlays.add(new ModalOverlay( 305 overlays.add(new ModalOverlay(
306 children: [new StockMenu( 306 children: [new StockMenu(
307 showing: _menuShowing, 307 showing: _menuShowing,
308 onStatusChanged: _handleMenuStatusChanged, 308 onStatusChanged: _handleMenuStatusChanged,
309 navigator: navigator,
309 autorefresh: _autorefresh, 310 autorefresh: _autorefresh,
310 onAutorefreshChanged: _handleAutorefreshChanged 311 onAutorefreshChanged: _handleAutorefreshChanged
311 )], 312 )],
312 onDismiss: _handleMenuHide)); 313 onDismiss: _handleMenuHide));
313 } 314 }
314 315
315 Widget build() { 316 Widget build() {
316 List<Widget> overlays = [ 317 List<Widget> overlays = [
317 new Scaffold( 318 new Scaffold(
318 toolbar: _isSearching ? buildSearchBar() : buildToolBar(), 319 toolbar: _isSearching ? buildSearchBar() : buildToolBar(),
319 body: buildTabNavigator(), 320 body: buildTabNavigator(),
320 snackBar: buildSnackBar(), 321 snackBar: buildSnackBar(),
321 floatingActionButton: buildFloatingActionButton(), 322 floatingActionButton: buildFloatingActionButton(),
322 drawer: buildDrawer() 323 drawer: buildDrawer()
323 ), 324 ),
324 ]; 325 ];
325 addMenuToOverlays(overlays); 326 addMenuToOverlays(overlays);
326 return new Stack(overlays); 327 return new Stack(overlays);
327 } 328 }
328 } 329 }
OLDNEW
« no previous file with comments | « no previous file | sky/sdk/example/stocks/lib/stock_menu.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698