Want to make a widget fill remaining space in a Column in Flutter? The Expanded widget expands to the space it can use. Althought I think it behaves a bit differently in a Row or Column.
1 2 3 4 5 6 7 8 9 10 11 12 |
new Column( children: <Widget>[ new Text('Title', style: new TextStyle(fontWeight: FontWeight.bold) ), new Expanded( child: new Text('Datetime', style: new TextStyle(color: Colors.grey) ), ), ], ) |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.