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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 child: new Text(text), | 44 child: new Text(text), |
45 onPressed: _handlePress | 45 onPressed: _handlePress |
46 ) | 46 ) |
47 ); | 47 ); |
48 } | 48 } |
49 } | 49 } |
50 | 50 |
51 class SkyHome extends App { | 51 class SkyHome extends App { |
52 Widget build() { | 52 Widget build() { |
53 List<Widget> children = [ | 53 List<Widget> children = [ |
54 new SkyDemo('Stocks App', 'examples/stocks2/lib/stock_app.dart'), | 54 new SkyDemo('Stocks App', 'lib/example/stocks2/lib/stock_app.dart'), |
55 new SkyDemo('Asteroids Game', 'examples/game/main.dart'), | 55 new SkyDemo('Asteroids Game', 'lib/example/game/main.dart'), |
56 new SkyDemo('Interactive Flex', 'examples/rendering/interactive_flex.dart'
), | 56 new SkyDemo('Interactive Flex', 'lib/example/rendering/interactive_flex.da
rt'), |
57 new SkyDemo('Sector Layout', 'examples/widgets/sector.dart'), | 57 new SkyDemo('Sector Layout', 'lib/example/widgets/sector.dart'), |
58 new SkyDemo('Touch Demo', 'examples/rendering/touch_demo.dart'), | 58 new SkyDemo('Touch Demo', 'lib/example/rendering/touch_demo.dart'), |
59 new SkyDemo('Minedigger Game', 'examples/mine_digger/mine_digger.dart'), | 59 new SkyDemo('Minedigger Game', 'lib/example/mine_digger/mine_digger.dart')
, |
60 | 60 |
61 // TODO(eseidel): We could use to separate these groups? | 61 // TODO(eseidel): We could use to separate these groups? |
62 new SkyDemo('Old Stocks App', 'examples/stocks/main.sky'), | 62 new SkyDemo('Old Stocks App', 'lib/example/stocks/main.sky'), |
63 new SkyDemo('Old Touch Demo', 'examples/raw/touch-demo.sky'), | 63 new SkyDemo('Old Touch Demo', 'lib/example/raw/touch-demo.sky'), |
64 new SkyDemo('Old Spinning Square', 'examples/raw/spinning-square.sky'), | 64 new SkyDemo('Old Spinning Square', 'lib/example/raw/spinning-square.sky'), |
65 | 65 |
66 new SkyDemo('Licences (Old)', 'LICENSES.sky'), | 66 new SkyDemo('Licences (Old)', 'LICENSES.sky'), |
67 ]; | 67 ]; |
68 | 68 |
69 return new Scaffold( | 69 return new Scaffold( |
70 toolbar: new ToolBar( | 70 toolbar: new ToolBar( |
71 center: new Text('Sky Demos', style: typography.white.title), | 71 center: new Text('Sky Demos', style: typography.white.title), |
72 backgroundColor: colors.Blue[500]), | 72 backgroundColor: colors.Blue[500]), |
73 body: new Material( | 73 body: new Material( |
74 edge: MaterialEdge.canvas, | 74 edge: MaterialEdge.canvas, |
75 child: new Flex( | 75 child: new Flex( |
76 children, | 76 children, |
77 direction: FlexDirection.vertical, | 77 direction: FlexDirection.vertical, |
78 justifyContent: FlexJustifyContent.spaceAround | 78 justifyContent: FlexJustifyContent.spaceAround |
79 ) | 79 ) |
80 ) | 80 ) |
81 ); | 81 ); |
82 } | 82 } |
83 } | 83 } |
84 | 84 |
85 void main() { | 85 void main() { |
86 runApp(new SkyHome()); | 86 runApp(new SkyHome()); |
87 } | 87 } |
OLD | NEW |