I have the following code
Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
TableHeadView(tablename: name, key: ValueKey(name + 'head')),
Expanded(
child: SingleChildScrollView(
child: TableBodyView(
tablename: name,
key: ValueKey(name + 'body'),
),
),
),
],
),
which now works to scroll when the TableBodyView's height is larger than the available height, but when I removed the Expanded widget, I couldn't scroll and the running the app showed the scary '~pixels overflowd' warning.
I understand that constraints go down and size go up in flutter, but I am having a hard time trying to figure out how the Expanded widget does any effect, since even without the Expanded widget, the constraints that SingleChildScrollView gets is the same, which is the Column widget sayig 'hey SingleChildScrollView, you can have as much height as you want whatever is left from the TableHeadView used up'
devtool's inspector to inspect the render tree and see theBoxConstraintsthat were applied to a particularRenderBoxwith and withoutExpandedwidget, more: docs.flutter.dev/tools/devtools/inspectorConstraintsTransformBoxorLayoutBuilderto see the incomingBoxConstraintsExpandedchangesBoxConstraintspassed to its child widget