Merge pull request #848 from Hixie/flex-part3

Replace Flex to Row and Column in tests and examples.
This commit is contained in:
Ian Hickson 2015-08-26 09:13:52 -07:00
commit dbfcdf1296
2 changed files with 5 additions and 10 deletions

View File

@ -20,7 +20,7 @@ class Field extends Component {
final String placeholder;
Widget build() {
return new Flex([
return new Row([
new Padding(
padding: const EdgeDims.symmetric(horizontal: 16.0),
child: new Icon(type: icon, size: 24)
@ -31,8 +31,7 @@ class Field extends Component {
placeholder: placeholder
)
)
],
direction: FlexDirection.horizontal
]
);
}
}

View File

@ -96,7 +96,7 @@ class MineDiggerApp extends App {
Widget buildBoard() {
bool hasCoveredCell = false;
List<Flex> flexRows = <Flex>[];
List<Row> flexRows = <Row>[];
for (int iy = 0; iy != 9; iy++) {
List<Widget> row = <Widget>[];
for (int ix = 0; ix != 9; ix++) {
@ -139,9 +139,8 @@ class MineDiggerApp extends App {
}
}
flexRows.add(
new Flex(
new Row(
row,
direction: FlexDirection.horizontal,
justifyContent: FlexJustifyContent.center,
key: new Key.stringify(iy)
)
@ -159,10 +158,7 @@ class MineDiggerApp extends App {
padding: new EdgeDims.all(10.0),
margin: new EdgeDims.all(10.0),
decoration: new BoxDecoration(backgroundColor: const Color(0xFF6B6B6B)),
child: new Flex(
flexRows,
direction: FlexDirection.vertical
)
child: new Column(flexRows)
);
}