Skip to content

flutter-fix-layout-issues

Fixes Flutter layout errors (overflows, unbounded constraints) using Dart and Flutter MCP tools. Use when addressing "RenderFlex overflowed", "Vertical

— (0 ratings) 44.9K downloads flutter
$ npx skills add https://github.com/flutter/agent-plugins --skill flutter-fix-layout-issues

Skills can run code on your computer. Review the source before installing. This listing is community-made and isn't affiliated with Anthropic.

About this skill

Resolving Flutter Layout Errors

Contents

Constraint Violation Diagnostics

Flutter layout operates on a strict rule: Constraints go down. Sizes go up. Parent sets position. Layout errors occur when this negotiation fails, typically due to unbounded constraints or unconstrained children.

Diagnose layout failures using the following error signatures:

  • "Vertical viewport was given unbounded height": Triggered when a scrollable widget (ListView, GridView) is placed inside an unconstrained vertical parent (Column). The parent provides infinite height, and the child attempts to expand infinitely.
  • "An InputDecorator...cannot have an unbounded width": Triggered when a TextField or TextFormField is placed inside an unconstrained horizontal parent (Row). The text field attempts to determine its width based on infinite available space.
  • "RenderFlex overflowed": Triggered when a child of a Row or Column requests a size larger than the parent's allocated constraints. Visually indicated by yellow and black warning stripes.
  • "Incorrect use of ParentData widget": Triggered when a ParentDataWidget is not a direct descendant of its required ancestor. (e.g., Expanded outside a Flex, Positioned outside a Stack).
  • "RenderBox was not laid out": A cascading side-effect error. Ignore this and look further up the stack trace for the primary constraint violation (usually an unbounded height/width error).

Layout Error Resolution Workflow


Installs: 44.9K | GitHub stars: 3.2K | First seen: Apr 24, 2026

Related skills

New

Design & UI

design-mobile-apps

Design mobile app screens with Sleek, edit Sleek projects, and implement their designs in React Native or HTML.

New • 1.7M
New

Testing

grill-with-docs

Relentless design interrogation that stress-tests plans against your domain model and sharpens terminology inline.

New • 1.4M
New

Frontend

frontend-design

Distinctive, production-grade frontend interfaces that reject generic AI aesthetics through intentional design choices.

New • 1.2M