Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
evanca avatar

Flutter Errors

  • 48 installs
  • 605 repo stars
  • Updated August 4, 2026
  • evanca/flutter-ai-rules

Helps with ai & agent building tasks.

About

flutter-errors is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted coding.

  • flutter-errors
  • AI & Agent Building
  • AI-coding skill

Flutter Errors by the numbers

  • 48 all-time installs (skills.sh)
  • Ranked #7,411 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/evanca/flutter-ai-rules --skill flutter-errors

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs48
repo stars605
Last updatedAugust 4, 2026
Repositoryevanca/flutter-ai-rules

What it does

Helps with ai & agent building tasks.

Files

SKILL.mdMarkdownGitHub ↗

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:

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:

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:

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 method.

Fix: Trigger state changes in response to user actions, or defer to after the frame using addPostFrameCallback:

@override
void initState() {
  super.initState();
  WidgetsBinding.instance.addPostFrameCallback((_) {
    // Safe to call setState or showDialog here
  });
}

---

ScrollController Attached to Multiple Scroll Views

Error: The ScrollController is attached to multiple scroll views.

Cause: A single ScrollController instance is shared across more than one scrollable widget simultaneously.

Fix: Ensure each scrollable widget has its own dedicated ScrollController instance.

---

RenderBox Was Not Laid Out

Error: RenderBox was not laid out: ...

Cause: A widget is missing or has unbounded constraints — commonly ListView or Column without proper size constraints.

Fix: Review your widget tree for missing constraints. Common patterns:

  • Wrap ListView in Expanded inside a Column.
  • Give widgets an explicit width or height via SizedBox or ConstrainedBox.

---

Debugging Layout Issues

  • Use the Flutter Inspector (in DevTools) to visualize widget constraints.
  • Enable "Show guidelines" to see layout boundaries.
  • Add debugPaintSizeEnabled = true; temporarily in your main() to paint layout bounds.
  • Refer to the Flutter constraints documentation for a deeper understanding of how constraints propagate.

References

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.