flutter-errors

Diagnose and fix common Flutter layout and runtime errors with code examples.

1|Updated Aug 14, 2026
One-click install
npx skills add https://github.com/sohampawar1866/zeromile-go --skill flutter-errors-sohampawar1866
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: flutter-errors
Source: https://github.com/sohampawar1866/zeromile-go/tree/main/.agents/skills/flutter-errors
Command: npx skills add https://github.com/sohampawar1866/zeromile-go --skill flutter-errors-sohampawar1866

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Flutter developers frequently encounter cryptic runtime errors like RenderFlex overflow, unbounded constraints, and setState-during-build that halt development. This Skill provides immediate, actionable fixes with working Dart code examples for the most common Flutter errors. ## Core Features & Use Cases - Layout Error Fixes: Solutions for RenderFlex overflow, unbounded height/width constraints, and RenderBox not laid out errors using Expanded, Flexible, and SizedBox. - State & Scroll Error Resolution: Fixes for setState called during build and ScrollController attached to multiple scroll views. - Debugging Guidance: Techniques using Flutter Inspector, debugPaintSizeEnabled, and DevTools to visualize layout constraints. - Use Case: When your app crashes with "Vertical viewport was given unbounded height" after adding a ListView inside a Column, get the exact fix: wrap the ListView in Expanded. ## Quick Start Ask how to fix the Flutter error "A RenderFlex overflowed by 42 pixels" in your Row widget.

Frequently Asked Questions about flutter-errors

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix RenderFlex overflowed error in Flutter?

A RenderFlex overflow occurs when a Row or Column contains children wider or taller than the available space. Wrap the overflowing child in Expanded or Flexible, or constrain its size with SizedBox so it fits within the available bounds.

How to fix vertical viewport was given unbounded height in Flutter?

This error happens when a ListView or other scrollable sits inside a Column without a bounded height. Wrap the ListView in Expanded, or give it a fixed height using SizedBox so the viewport receives finite constraints.

Why does setState called during build error happen in Flutter?

This error occurs when setState or showDialog is called directly inside the build method. Move state changes to user event handlers, or defer them using WidgetsBinding.instance.addPostFrameCallback in initState.

Can one ScrollController be shared between multiple scroll views?

No, a single ScrollController attached to multiple scrollable widgets simultaneously triggers an error. Create a dedicated ScrollController instance for each scrollable widget in your widget tree.

How do I debug layout constraint issues in Flutter?

Use the Flutter Inspector in DevTools to visualize widget constraints and enable Show Guidelines to see layout boundaries. You can also set debugPaintSizeEnabled to true in main() to paint layout bounds directly on screen.