The following assertion was thrown during performResize(): Vertical viewport was given unbounded height. code example

Example 1: Vertical viewport was given unbounded height.

ListView.builder(
    scrollDirection: Axis.vertical,
    shrinkWrap: true,
...

Example 2: Vertical viewport was given unbounded height.

Column(
  children: <Widget>[
    SizedBox(
      height: 400, // fixed height
      child: ListView(...),
    ),
  ],
)

Example 3: Vertical viewport was given unbounded height.

Column(
  children: <Widget>[
    Expanded( // wrap in Expanded
      child: ListView(...),
    ),
  ],
)

Tags:

Misc Example