I have roughly the following code
Column(
getWidget1(),
getWidget2(),
// Expanded(
SingleChildScrollView(
child: Table(
children = manyRows()
)
// )
)
)
I’m aware that using columns and scrollable is problematic, either throwing constraint errors (due to column providing virtually infinite vertical space, and expanded trying to take all the remaining space or SingleChildScrollViews trying to fit all their content or expanded, which results in an overflow)
How to fit a scrollable inside a column, that take all the space left? currently I’m implementing a workaround using SizedBox with hardcoded height, but it’s not sufficient.
3
Answers
you need to set the height for
getWidget1() and getWidget2()
You need to wrap column with
IntrinsicHeight
.Try this way,By wrapping the SingleChildScrollView with Expanded.