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

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

Issue 1226583005: Support for selected menu items (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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/lib/widgets/menu_item.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/widgets/basic.dart'; 6 import 'package:sky/widgets/basic.dart';
7 import 'package:sky/widgets/drawer.dart'; 7 import 'package:sky/widgets/drawer.dart';
8 import 'package:sky/widgets/drawer_header.dart'; 8 import 'package:sky/widgets/drawer_header.dart';
9 import 'package:sky/widgets/floating_action_button.dart'; 9 import 'package:sky/widgets/floating_action_button.dart';
10 import 'package:sky/widgets/icon.dart'; 10 import 'package:sky/widgets/icon.dart';
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 } 120 }
121 121
122 Drawer buildDrawer() { 122 Drawer buildDrawer() {
123 return new Drawer( 123 return new Drawer(
124 controller: _drawerController, 124 controller: _drawerController,
125 level: 3, 125 level: 3,
126 children: [ 126 children: [
127 new DrawerHeader(children: [new Text('Stocks')]), 127 new DrawerHeader(children: [new Text('Stocks')]),
128 new MenuItem( 128 new MenuItem(
129 icon: 'action/assessment', 129 icon: 'action/assessment',
130 selected: true,
130 children: [new Text('Stock List')]), 131 children: [new Text('Stock List')]),
131 new MenuItem( 132 new MenuItem(
132 icon: 'action/account_balance', 133 icon: 'action/account_balance',
133 children: [new Text('Account Balance')]), 134 children: [new Text('Account Balance')]),
134 new MenuDivider(), 135 new MenuDivider(),
135 new MenuItem( 136 new MenuItem(
136 icon: 'action/thumb_up', 137 icon: 'action/thumb_up',
137 onPressed: () => _handleStockModeChange(StockMode.optimistic), 138 onPressed: () => _handleStockModeChange(StockMode.optimistic),
138 children: [ 139 children: [
139 new Flexible(child: new Text('Optimistic')), 140 new Flexible(child: new Text('Optimistic')),
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 body: buildTabNavigator(), 293 body: buildTabNavigator(),
293 snackBar: buildSnackBar(), 294 snackBar: buildSnackBar(),
294 floatingActionButton: buildFloatingActionButton(), 295 floatingActionButton: buildFloatingActionButton(),
295 drawer: _drawerShowing ? buildDrawer() : null 296 drawer: _drawerShowing ? buildDrawer() : null
296 ), 297 ),
297 ]; 298 ];
298 addMenuToOverlays(overlays); 299 addMenuToOverlays(overlays);
299 return new Stack(overlays); 300 return new Stack(overlays);
300 } 301 }
301 } 302 }
OLDNEW
« no previous file with comments | « no previous file | sky/sdk/lib/widgets/menu_item.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698