Flutter layout - Set container to half height
Sun May 02 2021 14:29:08 GMT+0000 (Coordinated Universal Time)
Saved by @raymondfdavey #dart
If you want the container's height to be the half of the available space, you can use LayoutBuilder widget. With LayoutBuilder widget, you can know inside the builder function what the max available width and height would be. The example usage in your case would be like this:
https://stackoverflow.com/questions/54156365/sizing-a-container-to-exact-half-the-screen-size-in-flutter
Comments