I have a VerticalDivider
inside a Row
inside Column
inside a SingleChildScrollView
inside a LayoutBuilder
:
LayoutBuilder(
builder: (context, constraints) =>
[...]
SingleChildScrollView(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
[...]
VerticalDivider(
width: 1,
thickness: 1,
),
[...]
The way it is, the VerticalDivider
is not showing up. I guess it doesn’t know its height.
If I put a SizedBox
around the VerticalDivider
, with height from LayoutBuilder
or MediaQuery
, it will set the height once and when I scroll down, the vertical divider won’t reach all the way to the bottom.
How can I make a vertical divider resize with its parent. I get an error message with double.infinity
since SingleChildScrollView
doesn’t give vertical bounds.
Did I explain this properly?
2
Answers
I used the
InstrinsicHeight
Widget, wich is cost-intensiv and leads to problem which widget, that can't calculate an intrinsic height, but it works for now.increase the width and it will became visible you have given 1 width which is too small to notice.
try this:
checkout the difference between output for width 1 and width 20