Ask Your Question
1

What causes an empty container to occupy the entire screen height in Flutter?

asked 2023-05-27 10:04:43 +0000

lakamha gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2023-05-27 10:12:02 +0000

ladyg gravatar image

This can occur when the container is wrapped in a widget that does not constrain its dimensions, such as a Expanded or Flexible widget. The container will then expand to fill all available space in that dimension. To avoid this, make sure to wrap the container in a widget that constrains its dimensions, such as a SizedBox or ConstrainedBox.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-05-27 10:04:43 +0000

Seen: 14 times

Last updated: May 27 '23