| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 import 'package:sky/rendering/box.dart'; | |
| 6 import 'package:sky/rendering/flex.dart'; | |
| 7 import 'package:sky/widgets/raised_button.dart'; | |
| 8 import 'package:sky/widgets/basic.dart'; | |
| 9 | |
| 10 class ContainerApp extends App { | |
| 11 Widget build() { | |
| 12 return new Flex([ | |
| 13 new Container( | |
| 14 padding: new EdgeDims.all(10.0), | |
| 15 margin: new EdgeDims.all(10.0), | |
| 16 decoration: new BoxDecoration(backgroundColor: const Color(0xFFCCCCCC)
), | |
| 17 child: new Image( | |
| 18 src: "https://www.dartlang.org/logos/dart-logo.png", | |
| 19 size: new Size(300.0, 300.0) | |
| 20 ) | |
| 21 ), | |
| 22 new Container( | |
| 23 decoration: new BoxDecoration(backgroundColor: const Color(0xFFFFFF00)
), | |
| 24 padding: new EdgeDims.symmetric(horizontal: 50.0, vertical: 75.0), | |
| 25 child: new Flex([ | |
| 26 new RaisedButton( | |
| 27 child: new Text('PRESS ME'), | |
| 28 onPressed: () => print("Hello World") | |
| 29 ), | |
| 30 new RaisedButton( | |
| 31 child: new Text('DISABLED'), | |
| 32 onPressed: () => print("Hello World"), | |
| 33 enabled: false | |
| 34 ) | |
| 35 ]) | |
| 36 ), | |
| 37 new Flexible( | |
| 38 child: new Container( | |
| 39 decoration: new BoxDecoration(backgroundColor: const Color(0xFF00FFF
F)) | |
| 40 ) | |
| 41 ), | |
| 42 ], | |
| 43 direction: FlexDirection.vertical, | |
| 44 justifyContent: FlexJustifyContent.spaceBetween | |
| 45 ); | |
| 46 } | |
| 47 } | |
| 48 | |
| 49 void main() { | |
| 50 runApp(new ContainerApp()); | |
| 51 } | |
| OLD | NEW |