Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(307)

Side by Side Diff: sky/sdk/example/demo_launcher/lib/main.dart

Issue 1232103006: Add Cards and Fitness demos, remove sector. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Add TaskDescriptions to the new demos Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | sky/sdk/example/fitness/lib/main.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/mojo/activity.dart' as activity; 5 import 'package:sky/mojo/activity.dart' as activity;
6 import 'package:sky/mojo/asset_bundle.dart'; 6 import 'package:sky/mojo/asset_bundle.dart';
7 import 'package:sky/painting/box_painter.dart'; 7 import 'package:sky/painting/box_painter.dart';
8 import 'package:sky/theme/colors.dart' as colors; 8 import 'package:sky/theme/colors.dart' as colors;
9 import 'package:sky/theme/typography.dart' as typography; 9 import 'package:sky/theme/typography.dart' as typography;
10 import 'package:sky/widgets/basic.dart'; 10 import 'package:sky/widgets/basic.dart';
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 description: '2D game using sprite sheets to achieve high performance', 83 description: '2D game using sprite sheets to achieve high performance',
84 textTheme: typography.white, 84 textTheme: typography.white,
85 decoration: new BoxDecoration( 85 decoration: new BoxDecoration(
86 backgroundImage: new BackgroundImage( 86 backgroundImage: new BackgroundImage(
87 image: _bundle.loadImage('assets/game_thumbnail.png'), 87 image: _bundle.loadImage('assets/game_thumbnail.png'),
88 fit: BackgroundFit.cover 88 fit: BackgroundFit.cover
89 ) 89 )
90 ) 90 )
91 ), 91 ),
92 new SkyDemo( 92 new SkyDemo(
93 name: 'Interactive Flex', 93 name: 'Fitness',
94 href: '../../rendering/interactive_flex.dart', 94 href: '../../fitness/lib/main.dart',
95 bundle: 'interactive_flex.skyx', 95 bundle: 'fitness.skyx',
96 description: 'Swipe to adjust the layout of the app', 96 description: 'Collin should write a nice description',
97 textTheme: typography.white, 97 textTheme: typography.white,
98 decoration: new BoxDecoration( 98 decoration: new BoxDecoration(
99 backgroundColor: const Color(0xFF0081C6) 99 backgroundColor: const Color(0xFF0081C6)
100 ) 100 )
101 ), 101 ),
102 new SkyDemo( 102 new SkyDemo(
103 name: 'Sector', 103 name: 'Cards',
104 href: '../../widgets/sector.dart', 104 href: '../../widgets/card_collection.dart',
105 bundle: 'sector.skyx', 105 bundle: 'cards.skyx',
106 description: 'Demo of alternative layouts', 106 description: 'Demo of interactive Cards',
107 textTheme: typography.black, 107 textTheme: typography.white,
108 decoration: new BoxDecoration( 108 decoration: new BoxDecoration(
109 backgroundColor: colors.black, 109 backgroundColor: const Color(0xFF0081C6)
110 backgroundImage: new BackgroundImage( 110 )
111 image: _bundle.loadImage('assets/sector_thumbnail.png'), 111 ),
112 fit: BackgroundFit.cover 112 new SkyDemo(
113 ) 113 name: 'Interactive Text',
114 href: '../../rendering/interactive_flex.dart',
115 bundle: 'interactive_flex.skyx',
116 description: 'Swipe to reflow the app',
117 textTheme: typography.white,
118 decoration: new BoxDecoration(
119 backgroundColor: const Color(0xFF0081C6)
114 ) 120 )
115 ), 121 ),
116 // new SkyDemo( 122 // new SkyDemo(
117 123
118 // 'Touch Demo', '../../rendering/touch_demo.dart', 'Simple example showing handling of touch events at a low level'), 124 // 'Touch Demo', '../../rendering/touch_demo.dart', 'Simple example showing handling of touch events at a low level'),
119 new SkyDemo( 125 new SkyDemo(
120 name: 'Minedigger Game', 126 name: 'Minedigger Game',
121 href: '../../mine_digger/lib/main.dart', 127 href: '../../mine_digger/lib/main.dart',
122 bundle: 'mine_digger.skyx', 128 bundle: 'mine_digger.skyx',
123 description: 'Clone of the classic Minesweeper game', 129 description: 'Clone of the classic Minesweeper game',
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 itemBuilder: buildDemo, 177 itemBuilder: buildDemo,
172 padding: kListPadding 178 padding: kListPadding
173 ); 179 );
174 } 180 }
175 } 181 }
176 182
177 class SkyHome extends App { 183 class SkyHome extends App {
178 Widget build() { 184 Widget build() {
179 return new Theme( 185 return new Theme(
180 data: new ThemeData( 186 data: new ThemeData(
181 brightness: ThemeBrightness.dark, 187 brightness: ThemeBrightness.light,
182 primarySwatch: colors.Teal 188 primarySwatch: colors.Teal
183 ), 189 ),
184 child: new TaskDescription( 190 child: new TaskDescription(
185 label: 'Sky Demos', 191 label: 'Sky Demos',
186 child: new Scaffold( 192 child: new Scaffold(
187 toolbar: new ToolBar(center: new Text('Sky Demos')), 193 toolbar: new ToolBar(center: new Text('Sky Demos')),
188 body: new Material( 194 body: new Material(
189 type: MaterialType.canvas, 195 type: MaterialType.canvas,
190 child: new DemoList() 196 child: new DemoList()
191 ) 197 )
192 ) 198 )
193 ) 199 )
194 ); 200 );
195 } 201 }
196 } 202 }
197 203
198 void main() { 204 void main() {
199 runApp(new SkyHome()); 205 runApp(new SkyHome());
200 } 206 }
OLDNEW
« no previous file with comments | « no previous file | sky/sdk/example/fitness/lib/main.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698