I am stuck... This is my code broken down:
Column(
children: [
Column(
children: [
Text('Whyy'),
Spacer(),
Text('crash?'),
],
),
Text('ok'),
],
),
This crashes with the error:
RenderFlex children have non-zero flex but incoming height constraints are unbounded.
When a column is in a parent that does not provide a finite height constraint, for example if it is in a vertical scrollable, it will try to shrink-wrap its children along the vertical axis. Setting a flex on a child (e.g. using Expanded) indicates that the child is to expand to fill the remaining space in the vertical direction. These two directives are mutually exclusive. If a parent is to shrink-wrap its child, the child cannot simultaneously expand to fit its parent.
But why? Why on earth is this crashing? The Parent-Column
is inside a Scaffold
s body
.
What am I missing here?
Let me know if you need any more information!