OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |