| 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:sky/mojo/activity.dart' as activity; | 7 import 'package:sky/mojo/activity.dart' as activity; |
| 8 import 'package:sky/mojo/asset_bundle.dart'; | 8 import 'package:sky/mojo/asset_bundle.dart'; |
| 9 import 'package:sky/mojo/shell.dart' as shell; | |
| 10 import 'package:sky/painting/box_painter.dart'; | 9 import 'package:sky/painting/box_painter.dart'; |
| 11 import 'package:sky/theme/colors.dart' as colors; | 10 import 'package:sky/theme/colors.dart' as colors; |
| 12 import 'package:sky/theme/typography.dart' as typography; | 11 import 'package:sky/theme/typography.dart' as typography; |
| 13 import 'package:sky/widgets/basic.dart'; | 12 import 'package:sky/widgets/basic.dart'; |
| 14 import 'package:sky/widgets/card.dart'; | 13 import 'package:sky/widgets/card.dart'; |
| 15 import 'package:sky/widgets/fixed_height_scrollable.dart'; | |
| 16 import 'package:sky/widgets/flat_button.dart'; | |
| 17 import 'package:sky/widgets/material.dart'; | 14 import 'package:sky/widgets/material.dart'; |
| 18 import 'package:sky/widgets/scaffold.dart'; | 15 import 'package:sky/widgets/scaffold.dart'; |
| 19 import 'package:sky/widgets/task_description.dart'; | 16 import 'package:sky/widgets/task_description.dart'; |
| 20 import 'package:sky/widgets/theme.dart'; | 17 import 'package:sky/widgets/theme.dart'; |
| 21 import 'package:sky/widgets/tool_bar.dart'; | 18 import 'package:sky/widgets/tool_bar.dart'; |
| 22 import 'package:sky/widgets/scrollable_list.dart'; | 19 import 'package:sky/widgets/scrollable_list.dart'; |
| 23 | 20 |
| 24 AssetBundle _initBundle() { | 21 AssetBundle _initBundle() { |
| 25 if (rootBundle != null) | 22 if (rootBundle != null) |
| 26 return rootBundle; | 23 return rootBundle; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 class SkyDemo { | 56 class SkyDemo { |
| 60 String name; | 57 String name; |
| 61 String href; | 58 String href; |
| 62 String bundle; | 59 String bundle; |
| 63 String description; | 60 String description; |
| 64 typography.TextTheme textTheme; | 61 typography.TextTheme textTheme; |
| 65 BoxDecoration decoration; | 62 BoxDecoration decoration; |
| 66 SkyDemo({ this.name, this.href, this.bundle, this.description, this.textTheme,
this.decoration }); | 63 SkyDemo({ this.name, this.href, this.bundle, this.description, this.textTheme,
this.decoration }); |
| 67 } | 64 } |
| 68 | 65 |
| 69 List<Widget> demos = [ | 66 List<SkyDemo> demos = [ |
| 70 new SkyDemo( | 67 new SkyDemo( |
| 71 name: 'Stocks', | 68 name: 'Stocks', |
| 72 href: '../../stocks/lib/main.dart', | 69 href: '../../stocks/lib/main.dart', |
| 73 bundle: 'stocks.skyx', | 70 bundle: 'stocks.skyx', |
| 74 description: 'Multi-screen app with scrolling list', | 71 description: 'Multi-screen app with scrolling list', |
| 75 textTheme: typography.black, | 72 textTheme: typography.black, |
| 76 decoration: new BoxDecoration( | 73 decoration: new BoxDecoration( |
| 77 backgroundImage: new BackgroundImage( | 74 backgroundImage: new BackgroundImage( |
| 78 image: _bundle.loadImage('assets/stocks_thumbnail.png'), | 75 image: _bundle.loadImage('assets/stocks_thumbnail.png'), |
| 79 fit: BackgroundFit.cover | 76 fit: BackgroundFit.cover |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 ) | 188 ) |
| 192 ) | 189 ) |
| 193 ) | 190 ) |
| 194 ); | 191 ); |
| 195 } | 192 } |
| 196 } | 193 } |
| 197 | 194 |
| 198 void main() { | 195 void main() { |
| 199 runApp(new SkyHome()); | 196 runApp(new SkyHome()); |
| 200 } | 197 } |
| OLD | NEW |