How to achieve the following design in Flutter?
I'm trying to position a Card and a Button within a Column.
The Card must be positioned centered in the Column wihtout taking into consideration the height of the Button.
And the Button must be positioned at the bottom of the Column.
Align Widget is the widget that is used to align its child within itself and optionally sizes itself based on the child's size. Align Widget is quite flexible and can change its size according to the size of its child. Properties of Align Widget: alignment: It sets the alignment.
To answer the question's title (aligning items in a "Column
" widget), you can do it with the Align
widget:
Column(
children: <Widget>[
Align(
alignment: Alignment.center,
child: Container(...),
),
Align(
alignment: Alignment.bottomCenter,
child: Container(...),
),
],
)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With