| 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/editing2/input.dart'; | 5 import 'package:sky/editing2/input.dart'; |
| 6 import 'package:sky/rendering/box.dart'; | 6 import 'package:sky/rendering/box.dart'; |
| 7 import 'package:sky/rendering/paragraph.dart'; | 7 import 'package:sky/rendering/paragraph.dart'; |
| 8 import 'package:sky/theme2/colors.dart' as colors; | 8 import 'package:sky/theme2/colors.dart' as colors; |
| 9 import 'package:sky/theme2/typography.dart' as typography; | 9 import 'package:sky/theme2/typography.dart' as typography; |
| 10 import 'package:sky/widgets/basic.dart'; | 10 import 'package:sky/widgets/basic.dart'; |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 new MenuItem( | 120 new MenuItem( |
| 121 key: 'Account Balance', | 121 key: 'Account Balance', |
| 122 icon: 'action/account_balance', | 122 icon: 'action/account_balance', |
| 123 children: [new Text('Account Balance')]), | 123 children: [new Text('Account Balance')]), |
| 124 new MenuDivider(key: 'div1'), | 124 new MenuDivider(key: 'div1'), |
| 125 new MenuItem( | 125 new MenuItem( |
| 126 key: 'Optimistic Menu Item', | 126 key: 'Optimistic Menu Item', |
| 127 icon: 'action/thumb_up', | 127 icon: 'action/thumb_up', |
| 128 onGestureTap: (event) => _handleStockModeChange(StockMode.optimistic), | 128 onGestureTap: (event) => _handleStockModeChange(StockMode.optimistic), |
| 129 children: [ | 129 children: [ |
| 130 new FlexExpandingChild(new Text('Optimistic'), flex: 1), | 130 new Flexible(child: new Text('Optimistic')), |
| 131 new Radio(key: 'optimistic-radio', value: StockMode.optimistic, grou
pValue: _stockMode, onChanged: _handleStockModeChange) | 131 new Radio(key: 'optimistic-radio', value: StockMode.optimistic, grou
pValue: _stockMode, onChanged: _handleStockModeChange) |
| 132 ]), | 132 ]), |
| 133 new MenuItem( | 133 new MenuItem( |
| 134 key: 'Pessimistic Menu Item', | 134 key: 'Pessimistic Menu Item', |
| 135 icon: 'action/thumb_down', | 135 icon: 'action/thumb_down', |
| 136 onGestureTap: (event) => _handleStockModeChange(StockMode.pessimistic)
, | 136 onGestureTap: (event) => _handleStockModeChange(StockMode.pessimistic)
, |
| 137 children: [ | 137 children: [ |
| 138 new FlexExpandingChild(new Text('Pessimistic'), flex: 1), | 138 new Flexible(child: new Text('Pessimistic')), |
| 139 new Radio(key: 'pessimistic-radio', value: StockMode.pessimistic, gr
oupValue: _stockMode, onChanged: _handleStockModeChange) | 139 new Radio(key: 'pessimistic-radio', value: StockMode.pessimistic, gr
oupValue: _stockMode, onChanged: _handleStockModeChange) |
| 140 ]), | 140 ]), |
| 141 new MenuDivider(key: 'div2'), | 141 new MenuDivider(key: 'div2'), |
| 142 new MenuItem( | 142 new MenuItem( |
| 143 key: 'Settings', | 143 key: 'Settings', |
| 144 icon: 'action/settings', | 144 icon: 'action/settings', |
| 145 children: [new Text('Settings')]), | 145 children: [new Text('Settings')]), |
| 146 new MenuItem( | 146 new MenuItem( |
| 147 key: 'Help & Feedback', | 147 key: 'Help & Feedback', |
| 148 icon: 'action/help', | 148 icon: 'action/help', |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 } | 212 } |
| 213 | 213 |
| 214 void main() { | 214 void main() { |
| 215 print("starting stocks app!"); | 215 print("starting stocks app!"); |
| 216 App app = new StocksApp(); | 216 App app = new StocksApp(); |
| 217 UINodeAppView.appView.onFrame = () { | 217 UINodeAppView.appView.onFrame = () { |
| 218 // uncomment this for debugging: | 218 // uncomment this for debugging: |
| 219 // app.appView.debugDumpRenderTree(); | 219 // app.appView.debugDumpRenderTree(); |
| 220 }; | 220 }; |
| 221 } | 221 } |
| OLD | NEW |