Mahdi Aghajani
Mahdi Aghajani

Reputation: 147

Stack doesn't work inside Column - Flutter

Hope u all doing well. I have a problem with Stack and Column. When I want to use Stack inside Column's children, it doesn't work, anymore. here are 2 photos regarding my problem.

Not working:
enter image description here


Working:
enter image description here

Upvotes: 14

Views: 14652

Answers (1)

hasan karaman
hasan karaman

Reputation: 1430

Since column and stack will take up the screen size. To be able to use both together, you need to give the contents a certain height or need to be wrapped with expanded

Column(
  children: [
    Container(),
    Container(
      height: 100,
      child: Stack(),
    ), //container or expanded
  ],
 )

Upvotes: 28

Related Questions