Replace Flex to Row and Column in tests and examples.
This still leaves Flex and FlexDirection available. At some point once people have transitioned to Row/Column we should rename Flex to _Flex and stop reexporting FlexDirection from basic.dart.
This commit is contained in:
@@ -7,68 +7,71 @@ import 'dart:sky' as sky;
|
||||
import 'package:sky/rendering.dart';
|
||||
|
||||
void main() {
|
||||
var root = new RenderBlock(children: [
|
||||
new RenderPadding(
|
||||
padding: new EdgeDims.all(10.0),
|
||||
child: new RenderConstrainedBox(
|
||||
additionalConstraints: new BoxConstraints.tightFor(height: 100.0),
|
||||
child: new RenderDecoratedBox(
|
||||
decoration: new BoxDecoration(
|
||||
backgroundColor: new sky.Color(0xFFFFFF00)
|
||||
var root = new RenderFlex(
|
||||
children: [
|
||||
new RenderPadding(
|
||||
padding: new EdgeDims.all(10.0),
|
||||
child: new RenderConstrainedBox(
|
||||
additionalConstraints: new BoxConstraints.tightFor(height: 100.0),
|
||||
child: new RenderDecoratedBox(
|
||||
decoration: new BoxDecoration(
|
||||
backgroundColor: new sky.Color(0xFFFFFF00)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
new RenderPadding(
|
||||
padding: new EdgeDims.all(10.0),
|
||||
child: new RenderConstrainedBox(
|
||||
additionalConstraints: new BoxConstraints.tightFor(height: 100.0),
|
||||
child: new RenderDecoratedBox(
|
||||
decoration: new BoxDecoration(
|
||||
border: new Border(
|
||||
top: new BorderSide(color: new sky.Color(0xFFF00000), width: 5.0),
|
||||
right: new BorderSide(color: new sky.Color(0xFFFF9000), width: 10.0),
|
||||
bottom: new BorderSide(color: new sky.Color(0xFFFFF000), width: 15.0),
|
||||
left: new BorderSide(color: new sky.Color(0xFF00FF00), width: 20.0)
|
||||
),
|
||||
backgroundColor: new sky.Color(0xFFDDDDDD)
|
||||
),
|
||||
new RenderPadding(
|
||||
padding: new EdgeDims.all(10.0),
|
||||
child: new RenderConstrainedBox(
|
||||
additionalConstraints: new BoxConstraints.tightFor(height: 100.0),
|
||||
child: new RenderDecoratedBox(
|
||||
decoration: new BoxDecoration(
|
||||
border: new Border(
|
||||
top: new BorderSide(color: new sky.Color(0xFFF00000), width: 5.0),
|
||||
right: new BorderSide(color: new sky.Color(0xFFFF9000), width: 10.0),
|
||||
bottom: new BorderSide(color: new sky.Color(0xFFFFF000), width: 15.0),
|
||||
left: new BorderSide(color: new sky.Color(0xFF00FF00), width: 20.0)
|
||||
),
|
||||
backgroundColor: new sky.Color(0xFFDDDDDD)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
new RenderPadding(
|
||||
padding: new EdgeDims.all(10.0),
|
||||
child: new RenderConstrainedBox(
|
||||
additionalConstraints: new BoxConstraints.tightFor(height: 100.0),
|
||||
child: new RenderDecoratedBox(
|
||||
decoration: new BoxDecoration(
|
||||
backgroundColor: new sky.Color(0xFFFFFF00)
|
||||
),
|
||||
new RenderPadding(
|
||||
padding: new EdgeDims.all(10.0),
|
||||
child: new RenderConstrainedBox(
|
||||
additionalConstraints: new BoxConstraints.tightFor(height: 100.0),
|
||||
child: new RenderDecoratedBox(
|
||||
decoration: new BoxDecoration(
|
||||
backgroundColor: new sky.Color(0xFFFFFF00)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
new RenderPadding(
|
||||
padding: new EdgeDims.all(10.0),
|
||||
child: new RenderConstrainedBox(
|
||||
additionalConstraints: new BoxConstraints.tightFor(height: 100.0),
|
||||
child: new RenderDecoratedBox(
|
||||
decoration: new BoxDecoration(
|
||||
backgroundColor: new sky.Color(0xFFFFFF00)
|
||||
),
|
||||
new RenderPadding(
|
||||
padding: new EdgeDims.all(10.0),
|
||||
child: new RenderConstrainedBox(
|
||||
additionalConstraints: new BoxConstraints.tightFor(height: 100.0),
|
||||
child: new RenderDecoratedBox(
|
||||
decoration: new BoxDecoration(
|
||||
backgroundColor: new sky.Color(0xFFFFFF00)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
new RenderPadding(
|
||||
padding: new EdgeDims.all(10.0),
|
||||
child: new RenderConstrainedBox(
|
||||
additionalConstraints: new BoxConstraints.tightFor(height: 100.0),
|
||||
child: new RenderDecoratedBox(
|
||||
decoration: new BoxDecoration(
|
||||
backgroundColor: new sky.Color(0xFFFFFF00)
|
||||
),
|
||||
new RenderPadding(
|
||||
padding: new EdgeDims.all(10.0),
|
||||
child: new RenderConstrainedBox(
|
||||
additionalConstraints: new BoxConstraints.tightFor(height: 100.0),
|
||||
child: new RenderDecoratedBox(
|
||||
decoration: new BoxDecoration(
|
||||
backgroundColor: new sky.Color(0xFFFFFF00)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
]);
|
||||
),
|
||||
],
|
||||
direction: FlexDirection.vertical
|
||||
);
|
||||
new SkyBinding(root: root);
|
||||
}
|
||||
|
||||
@@ -17,7 +17,9 @@ void main() {
|
||||
|
||||
Matrix4 transform = new Matrix4.identity();
|
||||
RenderTransform spin = new RenderTransform(
|
||||
transform: transform, child: box);
|
||||
transform: transform,
|
||||
child: box
|
||||
);
|
||||
spin.rotateZ(1.0);
|
||||
|
||||
RenderFlex flex = new RenderFlex();
|
||||
|
||||
Reference in New Issue
Block a user