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

@@ -21,12 +21,12 @@ void main() {
setState = setStateRef;
return new Column(
children: <Widget>[
new Flexible(
new Expanded(
child: new Center(
child: new FlutterLogo(size: 100.0),
),
),
new Flexible(
new Expanded(
child: new Builder(
builder: (BuildContext context) {
List<Widget> children = <Widget>[];
@@ -43,7 +43,7 @@ void main() {
},
),
),
new Flexible(
new Expanded(
child: new Block(
padding: new EdgeInsets.symmetric(horizontal: 24.0),
children: <Widget>[ new Text(explanation, textAlign: TextAlign.center) ]