Vertical viewport was given unbounded height Flutter / Dart Origin: On your device OSI layer 7 · Application Last updated 4 Nov 2026

Flutter: Vertical viewport was given unbounded height. Viewports expand in the scrolling direction to fill their container

A scrollable (ListView, GridView) sits inside a parent that does not limit its height, so it tries to be infinitely tall.

Exact message you may see Vertical viewport was given unbounded heightHorizontal viewport was given unbounded widthViewports expand in the scrolling direction to fill their containerRenderViewport does not support returning intrinsic dimensionsListView inside Column unbounded height
Seen on: Flutter

Meaning

A Column gives children unbounded height. A ListView inside it wants to fill that infinite space and throws. Give the list a bounded height with Expanded, SizedBox or shrinkWrap, or use a CustomScrollView with slivers for mixed content.

Common causes

  • ListView directly inside a Column
  • ListView inside another scrollable (SingleChildScrollView)
  • GridView inside Column without Expanded
  • TabBarView or PageView inside Column without Expanded
  • Missing height in a Row/Column nesting

⚡ Quick fix

  1. Wrap the ListView in Expanded(child: …)
  2. Or use shrinkWrap: true plus physics: NeverScrollableScrollPhysics() for small lists
  3. Use slivers for complex pages

Detailed fix by platform

Flutter

  1. A column with a header and list: Column(children:[Header(), Expanded(child: ListView(...))])

Code examples

Bound the list

dart
Column(
  children: [
    const Text('Header'),
    Expanded(               // gives the ListView a finite height
      child: ListView.builder(
        itemCount: items.length,
        itemBuilder: (_, i) => ListTile(title: Text(items[i])),
      ),
    ),
  ],
)

How to diagnose

  1. Parent — Column/Row/Scroll view?
  2. Fix — Expanded or fixed height?
  3. Alternative — Slivers?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: On your device. Errors that are often confused with or caused by this one (click to open):

A RenderFlex overflowed — Flutter: A RenderFlex overflowed by x pixels on the right/bottom (Flutter / Dart)A RenderFlex overflow…Android license status unknown / licenses not accepted — flutter doctor: Android license status unknown. Run `flutter doctor --android-licenses` to accept the SDK licenses (Flutter / Dart)Android license statu…BoxConstraints forces an infinite width — Flutter: BoxConstraints forces an infinite width. These invalid constraints were provided to RenderStack's layout() function (TextField in a Row) (Flutter / Dart)BoxConstraints forces…Cleartext HTTP traffic not permitted — Flutter (Android): java.io.IOException: Cleartext HTTP traffic to api.example.com not permitted (Flutter / Dart)Cleartext HTTP traffi…Dependency requires compileSdk 34 or later — Android Gradle: Execution failed for task ':app:checkDebugAarMetadata'. Dependency requires libraries and applications that depend on it to compile against version 34 or later of the Android APIs (Flutter / Dart)Dependency requires c…Incorrect use of ParentDataWidget — Flutter: Incorrect use of ParentDataWidget. The ParentDataWidget Expanded(flex: 1) wants to apply ParentData of type FlexParentData to a RenderObject (Flutter / Dart)Incorrect use of Pare…RenderBox was not laid out — Flutter: RenderBox was not laid out: RenderFlex#a1b2c relayoutBoundary=up2 NEEDS-PAINT — Failed assertion: 'hasSize' (Flutter / Dart)RenderBox was not lai…Vertical …

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.