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

Side by Side Diff: sky/examples/stocks2/lib/stock_home.dart

Issue 1194743003: Add a new Theme widget to control color and text color of apps (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: rebase Created 5 years, 6 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 | « sky/examples/stocks2/lib/stock_app.dart ('k') | sky/examples/stocks2/lib/stock_settings.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/theme/colors.dart' as colors; 6 import 'package:sky/theme/colors.dart' as colors;
7 import 'package:sky/theme/typography.dart' as typography; 7 import 'package:sky/theme/typography.dart' as typography;
8 import 'package:sky/widgets/basic.dart'; 8 import 'package:sky/widgets/basic.dart';
9 import 'package:sky/widgets/drawer.dart'; 9 import 'package:sky/widgets/drawer.dart';
10 import 'package:sky/widgets/drawer_header.dart'; 10 import 'package:sky/widgets/drawer_header.dart';
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 icon: 'navigation/menu_white', 162 icon: 'navigation/menu_white',
163 onPressed: _handleOpenDrawer), 163 onPressed: _handleOpenDrawer),
164 center: new Text('Stocks', style: typography.white.title), 164 center: new Text('Stocks', style: typography.white.title),
165 right: [ 165 right: [
166 new IconButton( 166 new IconButton(
167 icon: 'action/search_white', 167 icon: 'action/search_white',
168 onPressed: _handleSearchBegin), 168 onPressed: _handleSearchBegin),
169 new IconButton( 169 new IconButton(
170 icon: 'navigation/more_vert_white', 170 icon: 'navigation/more_vert_white',
171 onPressed: _handleMenuShow) 171 onPressed: _handleMenuShow)
172 ], 172 ]
173 backgroundColor: colors.Purple[500]
174 ); 173 );
175 } 174 }
176 175
177 // TODO(abarth): Should we factor this into a SearchBar in the framework? 176 // TODO(abarth): Should we factor this into a SearchBar in the framework?
178 Widget buildSearchBar() { 177 Widget buildSearchBar() {
179 return new ToolBar( 178 return new ToolBar(
180 left: new IconButton( 179 left: new IconButton(
181 icon: 'navigation/arrow_back_grey600', 180 icon: 'navigation/arrow_back_grey600',
182 onPressed: _handleSearchEnd), 181 onPressed: _handleSearchEnd),
183 center: new Input( 182 center: new Input(
(...skipping 24 matching lines...) Expand all
208 floatingActionButton: new FloatingActionButton( 207 floatingActionButton: new FloatingActionButton(
209 child: new Icon(type: 'content/add_white', size: 24) 208 child: new Icon(type: 'content/add_white', size: 24)
210 ), 209 ),
211 drawer: _drawerShowing ? buildDrawer() : null 210 drawer: _drawerShowing ? buildDrawer() : null
212 ), 211 ),
213 ]; 212 ];
214 addMenuToOverlays(overlays); 213 addMenuToOverlays(overlays);
215 return new Stack(overlays); 214 return new Stack(overlays);
216 } 215 }
217 } 216 }
OLDNEW
« no previous file with comments | « sky/examples/stocks2/lib/stock_app.dart ('k') | sky/examples/stocks2/lib/stock_settings.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698