I want to position the Column
inside the Stack
, so that it takes 60% of the screen, and that it is positioned at the bottom of the screen.
////////
|
|
|40%
////////
|column
|
|
|
|60%
////////
Currently I am trying to do it with Positioned
and with MediaQuery
But It doesnt work.
new Positioned(
top: MediaQuery.of(context).size.height * .4,
height: MediaQuery.of(context).size.height * .6,
child: new Column(
I know there are some Fractional Widgets that should help.
You can do that with a Column widget (which is a subclass of a Flex widget) and Expanded children with the flex property.
Stack(
fit: StackFit.expand,
children: [
Column(
children: <Widget>[
Expanded(
flex: 4,
child: Container()
),
Expanded(
flex: 6,
child: Column(
children: <Widget>[],
),
)
],
)
],
)
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