flutter-errors
FeaturedUse when hitting layout errors (RenderFlex overflow, unbounded constraints, RenderBox not laid out), scroll errors, or setState-during-build errors.
AI & Automation 619 stars
60 forks Updated today MIT
Install
Quality Score: 95/100
Stars 20%
Recency 20%
Frontmatter 20%
Documentation 15%
Issue Health 10%
License 10%
Description 5%
Skill Content
# Flutter Errors Skill
This skill provides solutions for the most common Flutter runtime and layout errors.
---
## RenderFlex Overflowed
**Error:** `A RenderFlex overflowed by X pixels on the right/bottom.`
**Cause:** A `Row` or `Column` contains children that are wider/taller than the available space.
**Fix:** Wrap the overflowing child in `Flexible` or `Expanded`, or constrain its size:
```dart
Row(
children: [
Expanded(child: Text('Long text that might overflow')),
Icon(Icons.info),
],
)
```
---
## Vertical Viewport Given Unbounded Height
**Error:** `Vertical viewport was given unbounded height.`
**Cause:** A `ListView` (or other scrollable) is placed inside a `Column` without a bounded height.
**Fix:** Wrap the `ListView` in `Expanded` or give it a fixed height with `SizedBox`:
```dart
Column(
children: [
Text('Header'),
Expanded(
child: ListView(children: [...]),
),
],
)
```
---
## InputDecorator Cannot Have Unbounded Width
**Error:** `An InputDecorator...cannot have an unbounded width.`
**Cause:** A `TextField` or similar widget is placed in a context without width constraints.
**Fix:** Wrap it in `Expanded`, `SizedBox`, or any parent that provides width constraints:
```dart
Row(
children: [
Expanded(child: TextField()),
],
)
```
---
## setState Called During Build
**Error:** `setState() or markNeedsBuild() called during build.`
**Cause:** `setState` or `showDialog` is called directly inside the `build` me...
Details
- Author
- evanca
- Repository
- evanca/flutter-ai-rules
- Created
- 1 years ago
- Last Updated
- today
- Language
- Shell
- License
- MIT
Similar Skills
Semantically similar based on skill content — not just same category
AI & Automation Listed
flutter-fix-layout-issues
Fixes Flutter layout errors (overflows, unbounded constraints) using Dart and Flutter MCP tools. Use when addressing "RenderFlex overflowed", "Vertical viewport was given unbounded height", or similar layout issues.
3 Updated today
SamuelAlev AI & Automation Listed
flutter-skills
Flutter/Dart patterns, widgets, and best practices for cross-platform mobile
0 Updated today
murtazatouqeer AI & Automation Featured
flutter-expert
Use when building cross-platform applications with Flutter 3+ and Dart. Invoke for widget development, Riverpod/Bloc state management, GoRouter navigation, platform-specific implementations, performance optimization.
11,157 Updated 2 weeks ago
Jeffallan