| 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/theme2/colors.dart' as colors; | 5 import 'package:sky/theme2/colors.dart' as colors; |
| 6 import 'package:sky/theme2/typography.dart' as typography; | 6 import 'package:sky/theme2/typography.dart' as typography; |
| 7 import 'package:sky/widgets/basic.dart'; | 7 import 'package:sky/widgets/basic.dart'; |
| 8 import 'package:sky/widgets/checkbox.dart'; | 8 import 'package:sky/widgets/checkbox.dart'; |
| 9 import 'package:sky/widgets/icon_button.dart'; | 9 import 'package:sky/widgets/icon_button.dart'; |
| 10 import 'package:sky/widgets/menu_item.dart'; | 10 import 'package:sky/widgets/menu_item.dart'; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 backgroundColor: colors.Purple[500] | 34 backgroundColor: colors.Purple[500] |
| 35 ); | 35 ); |
| 36 } | 36 } |
| 37 | 37 |
| 38 Widget buildSettingsPane() { | 38 Widget buildSettingsPane() { |
| 39 return new Container( | 39 return new Container( |
| 40 padding: const EdgeDims.symmetric(vertical: 20.0), | 40 padding: const EdgeDims.symmetric(vertical: 20.0), |
| 41 decoration: new BoxDecoration(backgroundColor: colors.Grey[50]), | 41 decoration: new BoxDecoration(backgroundColor: colors.Grey[50]), |
| 42 child: new Block([ | 42 child: new Block([ |
| 43 new MenuItem( | 43 new MenuItem( |
| 44 key: 'Optimistic Setting', | |
| 45 icon: 'action/thumb_up', | 44 icon: 'action/thumb_up', |
| 46 onGestureTap: (event) => _handleAwesomeChanged(!_awesome), | 45 onGestureTap: (event) => _handleAwesomeChanged(!_awesome), |
| 47 children: [ | 46 children: [ |
| 48 new Flexible(child: new Text('Everything is awesome')), | 47 new Flexible(child: new Text('Everything is awesome')), |
| 49 new Checkbox(key: 'awesome', value: _awesome, onChanged: _handleAwes
omeChanged) | 48 new Checkbox(value: _awesome, onChanged: _handleAwesomeChanged) |
| 50 ] | 49 ] |
| 51 ), | 50 ), |
| 52 ]) | 51 ]) |
| 53 ); | 52 ); |
| 54 } | 53 } |
| 55 | 54 |
| 56 Widget build() { | 55 Widget build() { |
| 57 return new Scaffold( | 56 return new Scaffold( |
| 58 toolbar: buildToolBar(), | 57 toolbar: buildToolBar(), |
| 59 body: buildSettingsPane() | 58 body: buildSettingsPane() |
| 60 ); | 59 ); |
| 61 } | 60 } |
| 62 } | 61 } |
| OLD | NEW |