| 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 'dart:sky'; | 5 import 'dart:sky'; |
| 6 | 6 |
| 7 import 'package:mojom/intents/intents.mojom.dart'; | 7 import 'package:mojom/intents/intents.mojom.dart'; |
| 8 import 'package:sky/framework/shell.dart' as shell; | 8 import 'package:sky/framework/shell.dart' as shell; |
| 9 import 'package:sky/theme/colors.dart' as colors; | 9 import 'package:sky/theme/colors.dart' as colors; |
| 10 import 'package:sky/theme/edges.dart'; | 10 import 'package:sky/theme/edges.dart'; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 return new RaisedButton( | 41 return new RaisedButton( |
| 42 child: new Text(text), | 42 child: new Text(text), |
| 43 onPressed: _handlePress | 43 onPressed: _handlePress |
| 44 ); | 44 ); |
| 45 } | 45 } |
| 46 } | 46 } |
| 47 | 47 |
| 48 class SkyHome extends App { | 48 class SkyHome extends App { |
| 49 UINode build() { | 49 UINode build() { |
| 50 List<UINode> children = [ | 50 List<UINode> children = [ |
| 51 new SkyDemo('Stocks2 App', 'examples/stocks2/lib/stock_app.dart'), | 51 new SkyDemo('Stocks App', 'examples/stocks2/lib/stock_app.dart'), |
| 52 new SkyDemo('Box2D Game', 'examples/game/main.dart'), | 52 new SkyDemo('Astroids Game', 'examples/game/main.dart'), |
| 53 new SkyDemo('Interactive Flex', 'examples/rendering/interactive_flex.dart'
), | 53 new SkyDemo('Interactive Flex', 'examples/rendering/interactive_flex.dart'
), |
| 54 new SkyDemo('Sector Layout', 'examples/rendering/sector_layout.dart'), | 54 new SkyDemo('Sector Layout', 'examples/rendering/sector_layout.dart'), |
| 55 new SkyDemo('Touch Demo', 'examples/rendering/touch_demo.dart'), | 55 new SkyDemo('Touch Demo', 'examples/rendering/touch_demo.dart'), |
| 56 | 56 |
| 57 // TODO(eseidel): We could use to separate these groups? | 57 // TODO(eseidel): We could use to separate these groups? |
| 58 new SkyDemo('Stocks App (Old)', 'examples/stocks/main.sky'), | 58 new SkyDemo('Old Stocks App', 'examples/stocks/main.sky'), |
| 59 new SkyDemo('Touch Demo (Old)', 'examples/raw/touch-demo.sky'), | 59 new SkyDemo('Old Touch Demo', 'examples/raw/touch-demo.sky'), |
| 60 new SkyDemo('Spinning Square (Old)', 'examples/raw/spinning-square.sky'), | 60 new SkyDemo('Old Spinning Square', 'examples/raw/spinning-square.sky'), |
| 61 | 61 |
| 62 new SkyDemo('Licences (Old)', 'LICENSES.sky'), | 62 new SkyDemo('Licences (Old)', 'LICENSES.sky'), |
| 63 ]; | 63 ]; |
| 64 | 64 |
| 65 return new Scaffold( | 65 return new Scaffold( |
| 66 toolbar: new ToolBar( | 66 toolbar: new ToolBar( |
| 67 center: new Text('Sky Demos', style: typography.white.title), | 67 center: new Text('Sky Demos', style: typography.white.title), |
| 68 backgroundColor: colors.Blue[500]), | 68 backgroundColor: colors.Blue[500]), |
| 69 body: new Material( | 69 body: new Material( |
| 70 edge: MaterialEdge.canvas, | 70 edge: MaterialEdge.canvas, |
| 71 child: new Flex( | 71 child: new Flex( |
| 72 children, | 72 children, |
| 73 direction: FlexDirection.vertical, | 73 direction: FlexDirection.vertical, |
| 74 justifyContent: FlexJustifyContent.spaceAround | 74 justifyContent: FlexJustifyContent.spaceAround |
| 75 ) | 75 ) |
| 76 ) | 76 ) |
| 77 ); | 77 ); |
| 78 } | 78 } |
| 79 } | 79 } |
| 80 | 80 |
| 81 void main() { | 81 void main() { |
| 82 runApp(new SkyHome()); | 82 runApp(new SkyHome()); |
| 83 } | 83 } |
| OLD | NEW |