Flutter: Trying to bottom-center an item in a Column, but it keeps left-aligning
Align is the way to go if you have only one child
.
If you have more, consider doing something like this:
return new Column( crossAxisAlignment: CrossAxisAlignment.center, mainAxisSize: MainAxisSize.max, mainAxisAlignment: MainAxisAlignment.end, children: <Widget>[ // Your elements here ],);
The easiest and the correct way to do it - use Spacer()
Example:
Column( children: [ SomeWidgetOnTheTop(), Spacer(), SomeCenterredBottomWidget(), ],);
Expanded( child: Align( alignment: FractionalOffset.bottomCenter, child: Padding( padding: EdgeInsets.only(bottom: 10.0), child: //Your widget here, ), ),),