flutter unwanted spacing in flex if only one child code example
Example 1: flutter how to space buttons evenly in a row
//Use mainAxisAligment: MainAxisAlignment.spaceEvenly,
//After initializing the row
new Container(
alignment: FractionalOffset.center,
child: new Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[
new FlatButton(
child: new Text('Don\'t have an account?', style: new TextStyle(color: Color(0xFF2E3233))),
),
new FlatButton(
child: new Text('Register.', style: new TextStyle(color: Color(0xFF84A2AF), fontWeight: FontWeight.bold),),
onPressed: moveToRegister,
)
],
),
),
Example 2: column remove space between flutter
Column(
children: [
SizedBox( // <-- use a sized box and change the height
height: 40.0,
child: ListTile(
title: Text(element.controlConfig.label),
),
),
],
),