Rename Flexible to Expanded and improve docs (#6978)

This patch replaces uses of Flexible with Expanded where we're using
FlexFit.tight. We still need to think of a better name for the
FlexFit.loose variant.

Also, improve the docs for Row, Column, Flex, and RenderFlex to be more
problem-oriented and to give a complete account of the layout algorithn.

Fixes #6960
Fixes #5169
This commit is contained in:
Adam Barth
2016-11-21 23:16:43 -08:00
committed by GitHub
parent a0c567f751
commit 8ca4caa440
48 changed files with 300 additions and 198 deletions

View File

@@ -37,7 +37,7 @@ class AdaptedGridItem extends StatelessWidget {
return new Card(
child: new Column(
children: <Widget>[
new Flexible(
new Expanded(
child: new Container(
decoration: new BoxDecoration(
backgroundColor: Colors.lightBlueAccent[100]
@@ -48,7 +48,7 @@ class AdaptedGridItem extends StatelessWidget {
margin: const EdgeInsets.only(left: 8.0),
child: new Row(
children: <Widget>[
new Flexible(
new Expanded(
child: new Text(name)
),
new IconButton(

View File

@@ -130,7 +130,7 @@ class SectorAppState extends State<SectorApp> {
mainAxisAlignment: MainAxisAlignment.spaceAround
)
),
new Flexible(
new Expanded(
child: new Container(
margin: new EdgeInsets.all(8.0),
decoration: new BoxDecoration(

View File

@@ -23,7 +23,7 @@ class Rectangle extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new Flexible(
return new Expanded(
child: new Container(
decoration: new BoxDecoration(backgroundColor: color)
)