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 import 'package:sky/framework/app.dart'; | 6 import 'package:sky/framework/app.dart'; |
7 import 'package:sky/framework/rendering/box.dart'; | 7 import 'package:sky/framework/rendering/box.dart'; |
8 import 'package:sky/framework/rendering/flex.dart'; | 8 import 'package:sky/framework/rendering/flex.dart'; |
| 9 import 'package:sky/framework/theme2/shadows.dart'; |
9 | 10 |
10 AppView app; | 11 AppView app; |
11 | 12 |
12 void main() { | 13 void main() { |
13 var coloredBox = new RenderDecoratedBox( | 14 var coloredBox = new RenderDecoratedBox( |
14 decoration: new BoxDecoration(backgroundColor: const Color(0xFFFFFF00)) | 15 decoration: new BoxDecoration( |
| 16 backgroundColor: const Color(0xFFFAFAFA), |
| 17 boxShadow: Shadow[3]) |
15 ); | 18 ); |
16 var shadow = const BoxShadow( | 19 var paddedBox = new RenderPadding( |
17 color: const Color(0xFFEEEEEE), offset: const Size(5.0, 5.0), blur: 5.0); | 20 padding: const EdgeDims.all(50.0), |
18 var shadowBox = new RenderShadowedBox(shadow: shadow, child: coloredBox); | 21 child: coloredBox); |
19 var paddedBox = new RenderPadding(padding: const EdgeDims.all(30.0), | 22 app = new AppView(new RenderDecoratedBox( |
20 child: shadowBox); | 23 decoration: const BoxDecoration( |
21 app = new AppView(paddedBox); | 24 backgroundColor: const Color(0xFFFFFFFF) |
| 25 ), |
| 26 child: paddedBox |
| 27 )); |
22 } | 28 } |
OLD | NEW |