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 'package:sky/rendering/box.dart'; | 5 import 'package:sky/rendering/box.dart'; |
6 import 'package:sky/rendering/flex.dart'; | 6 import 'package:sky/rendering/flex.dart'; |
7 import 'package:sky/widgets/raised_button.dart'; | 7 import 'package:sky/widgets/raised_button.dart'; |
8 import 'package:sky/widgets/basic.dart'; | 8 import 'package:sky/widgets/basic.dart'; |
9 | 9 |
10 class ContainerApp extends App { | 10 class ContainerApp extends App { |
11 UINode build() { | 11 Widget build() { |
12 return new Flex([ | 12 return new Flex([ |
13 new Container( | 13 new Container( |
14 key: 'a', | 14 key: 'a', |
15 padding: new EdgeDims.all(10.0), | 15 padding: new EdgeDims.all(10.0), |
16 margin: new EdgeDims.all(10.0), | 16 margin: new EdgeDims.all(10.0), |
17 decoration: new BoxDecoration(backgroundColor: const Color(0xFFCCCCCC)
), | 17 decoration: new BoxDecoration(backgroundColor: const Color(0xFFCCCCCC)
), |
18 child: new Image( | 18 child: new Image( |
19 src: "https://www.dartlang.org/logos/dart-logo.png", | 19 src: "https://www.dartlang.org/logos/dart-logo.png", |
20 size: new Size(300.0, 300.0) | 20 size: new Size(300.0, 300.0) |
21 ) | 21 ) |
(...skipping 24 matching lines...) Expand all Loading... |
46 ], | 46 ], |
47 direction: FlexDirection.vertical, | 47 direction: FlexDirection.vertical, |
48 justifyContent: FlexJustifyContent.spaceBetween | 48 justifyContent: FlexJustifyContent.spaceBetween |
49 ); | 49 ); |
50 } | 50 } |
51 } | 51 } |
52 | 52 |
53 void main() { | 53 void main() { |
54 new ContainerApp(); | 54 new ContainerApp(); |
55 } | 55 } |
OLD | NEW |