Flutter: “RenderFlex children have non-zero flex but incoming height constraints are unbounded”

Wrap your Column inside an Expanded or SizedBox (with some height) like this:

Expanded(
  child: Column(...)
)

OR

SizedBox(
  height: 200, // Some height
  child: Column(...),
)

Note that a Flex class or sub-class (like Column) should not be child of other Flex classes, and their parent class needs to be of type Flexible (i.e. inherit it, like Expanded), else, Flex-class gets unbounded (and remaining space cannot be calculated) which causes no direct issue till yet another child tries to calculate and/or fill space.

Leave a Comment

tech