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 library fn; | 5 library fn; |
6 | 6 |
7 import 'app.dart'; | 7 import 'app.dart'; |
8 import 'dart:async'; | 8 import 'dart:async'; |
9 import 'dart:collection'; | 9 import 'dart:collection'; |
10 import 'dart:mirrors'; | 10 import 'dart:mirrors'; |
(...skipping 963 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
974 if (padding != null) | 974 if (padding != null) |
975 current = new Padding(padding: padding, child: current); | 975 current = new Padding(padding: padding, child: current); |
976 | 976 |
977 if (decoration != null) | 977 if (decoration != null) |
978 current = new DecoratedBox(decoration: decoration, child: current); | 978 current = new DecoratedBox(decoration: decoration, child: current); |
979 | 979 |
980 if (desiredSize != null) | 980 if (desiredSize != null) |
981 current = new SizedBox(desiredSize: desiredSize, child: current); | 981 current = new SizedBox(desiredSize: desiredSize, child: current); |
982 | 982 |
983 if (constraints != null) | 983 if (constraints != null) |
984 current = new ConstrainedBox(constraints: constraints); | 984 current = new ConstrainedBox(constraints: constraints, child: current); |
985 | 985 |
986 if (margin != null) | 986 if (margin != null) |
987 current = new Padding(padding: margin, child: current); | 987 current = new Padding(padding: margin, child: current); |
988 | 988 |
989 if (transform != null) | 989 if (transform != null) |
990 current = new Transform(transform: transform, child: current); | 990 current = new Transform(transform: transform, child: current); |
991 | 991 |
992 if (current == null) | 992 if (current == null) |
993 current = new SizedBox(); | 993 current = new SizedBox(); |
994 | 994 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1033 assert(root.parent is RenderView); | 1033 assert(root.parent is RenderView); |
1034 } | 1034 } |
1035 } | 1035 } |
1036 | 1036 |
1037 class Text extends Component { | 1037 class Text extends Component { |
1038 Text(this.data) : super(key: '*text*'); | 1038 Text(this.data) : super(key: '*text*'); |
1039 final String data; | 1039 final String data; |
1040 bool get interchangeable => true; | 1040 bool get interchangeable => true; |
1041 UINode build() => new Paragraph(text: data); | 1041 UINode build() => new Paragraph(text: data); |
1042 } | 1042 } |
OLD | NEW |