Search code examples
flutterdartlayoutflutter-layoutcalculation

How to calculate the remaining size of the widget from flutter?


I created a flutter widget in order Container ~> Columns [ Containers Expanded ~> Stack ~> MaterialApp ~> Scaffold , Container( ], I tried with the media query size height but got the result screen height throughout the app,

how do i get the rest of the child stack height?


Solution

  • Use the LayoutBuilder widget. It gives the property constraints, which is the available constraints for that particular level.