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:
@@ -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(
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user