# RenderFlex children have non-zero flex but incoming height constraints are unbounded

- **ID:** `flutter/renderflex-vertical-viewport`
- **Domain:** flutter
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 95%

## Root Cause

A Column or Flex widget with Expanded children is placed inside a scrollable view (e.g., ListView, SingleChildScrollView) that does not provide a bounded height constraint.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| Flutter 3.10.0 | active | — | — |
| Dart 3.0.0 | active | — | — |

## Workarounds

1. **Wrap the Column inside an IntrinsicHeight widget to provide a bounded constraint. Example: IntrinsicHeight(child: Column(children: [Expanded(child: ...), ...]));** (85% success)
   ```
   Wrap the Column inside an IntrinsicHeight widget to provide a bounded constraint. Example: IntrinsicHeight(child: Column(children: [Expanded(child: ...), ...]));
   ```
2. **Use a ShrinkWrappingViewport or set the ListView's shrinkWrap: true and neverScrollableScrollPhysics: true to allow the Column to calculate its own height.** (90% success)
   ```
   Use a ShrinkWrappingViewport or set the ListView's shrinkWrap: true and neverScrollableScrollPhysics: true to allow the Column to calculate its own height.
   ```
3. **Replace the scrollable parent with a NonScrollableColumn or use a CustomScrollView with slivers that provide bounded constraints.** (80% success)
   ```
   Replace the scrollable parent with a NonScrollableColumn or use a CustomScrollView with slivers that provide bounded constraints.
   ```

## Dead Ends

- **Wrap the Column in a SizedBox with a fixed height** — A fixed height may not adapt to different screen sizes and can cause overflow on smaller devices. (50% fail)
- **Replace Expanded with Flexible without flex value** — Flexible still requires a bounded constraint; the error persists if the parent is unbounded. (70% fail)
