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/mojo/shell.dart' as shell; | 8 import 'package:sky/mojo/shell.dart' as shell; |
9 import 'package:sky/painting/box_painter.dart'; | 9 import 'package:sky/painting/box_painter.dart'; |
10 import 'package:sky/theme/colors.dart' as colors; | 10 import 'package:sky/theme/colors.dart' as colors; |
11 import 'package:sky/theme/edges.dart'; | |
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'; | 14 import 'package:sky/widgets/fixed_height_scrollable.dart'; |
16 import 'package:sky/widgets/flat_button.dart'; | 15 import 'package:sky/widgets/flat_button.dart'; |
17 import 'package:sky/widgets/material.dart'; | 16 import 'package:sky/widgets/material.dart'; |
18 import 'package:sky/widgets/scaffold.dart'; | 17 import 'package:sky/widgets/scaffold.dart'; |
19 import 'package:sky/widgets/theme.dart'; | 18 import 'package:sky/widgets/theme.dart'; |
20 import 'package:sky/widgets/tool_bar.dart'; | 19 import 'package:sky/widgets/tool_bar.dart'; |
21 | 20 |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 .skip(start) | 162 .skip(start) |
164 .take(count) | 163 .take(count) |
165 .map(buildDemo) | 164 .map(buildDemo) |
166 .toList(growable: false); | 165 .toList(growable: false); |
167 } | 166 } |
168 } | 167 } |
169 | 168 |
170 class SkyHome extends App { | 169 class SkyHome extends App { |
171 Widget build() { | 170 Widget build() { |
172 return new Theme( | 171 return new Theme( |
173 data: new ThemeData.dark( | 172 data: new ThemeData( |
174 primary: colors.Teal, | 173 brightness: ThemeBrightness.dark, |
175 accent: colors.Orange | 174 primarySwatch: colors.Teal |
176 ), | 175 ), |
177 child: new Scaffold( | 176 child: new Scaffold( |
178 toolbar: new ToolBar(center: new Text('Sky Demos')), | 177 toolbar: new ToolBar(center: new Text('Sky Demos')), |
179 body: new Material( | 178 body: new Material( |
180 edge: MaterialEdge.canvas, | 179 type: MaterialType.canvas, |
181 child: new DemoList() | 180 child: new DemoList() |
182 ) | 181 ) |
183 ) | 182 ) |
184 ); | 183 ); |
185 } | 184 } |
186 } | 185 } |
187 | 186 |
188 void main() { | 187 void main() { |
189 runApp(new SkyHome()); | 188 runApp(new SkyHome()); |
190 } | 189 } |
OLD | NEW |