Analyzed Jul 13, 2026
The skill is a purely instructional guide for Flutter developers to resolve common layout constraint errors. It contains no executable code or external connections.
flutter/agent-plugins · Official
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.
npx skills add flutter/agent-plugins --skill flutter-fix-layout-issues
Related neighbors and high-traction skills in the same topics — useful to compare before installing.
Helps users discover and install agent skills when they ask questions like "how do I do X", "fi…
3.3M installsBrowser automation CLI for AI agents. Use when the user needs to interact with websites, includ…
810.4K installsReview UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "chec…
617.3K installsBuild, deploy, evaluate, optimize, fine-tune, and manage Microsoft Foundry agents, models, and …
576.5K installsPrepare azd-based Azure projects for deployment: generates azure.yaml, infrastructure (Bicep/Te…
568.3K installsPartner security reviews for this skill.
Analyzed Jul 13, 2026
The skill is a purely instructional guide for Flutter developers to resolve common layout constraint errors. It contains no executable code or external connections.
Analyzed Jul 13, 2026
No issues detected.
Analyzed Jul 13, 2026
0 alerts
Other skills from flutter/agent-plugins · top by installs.
npx skills add flutter/agent-plugins
Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.
main
Parsed from SKILL.md frontmatter.
Files included with this skill beyond the listing page.
SKILL.md
5,326 B
SUMMARY.md
248 B
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:
ListView, GridView) is placed inside an unconstrained vertical parent (Column). The parent provides infinite height, and the child attempts to expand infinitely.TextField or TextFormField is placed inside an unconstrained horizontal parent (Row). The text field attempts to determine its width based on infinite available space.Row or Column requests a size larger than the parent's allocated constraints. Visually indicated by yellow and black warning stripes.ParentDataWidget is not a direct descendant of its required ancestor. (e.g., Expanded outside a Flex, Positioned outside a Stack).Copy and use this checklist to systematically resolve layout constraint violations.
- If "Vertical viewport was given unbounded height": Wrap the scrollable child (ListView, GridView) in an Expanded widget to consume remaining space, or wrap it in a SizedBox to provide an absolute height constraint. - If "An InputDecorator...cannot have an unbounded width": Wrap the TextField or TextFormField in an Expanded or Flexible widget. - If "RenderFlex overflowed": Constrain the overflowing child by wrapping it in an Expanded widget (to force it to fit) or a Flexible widget (to allow it to be smaller than the allocated space). - If "Incorrect use of ParentData widget": Move the ParentDataWidget to be a direct child of its required parent. Ensure Expanded/Flexible are direct children of Row/Column/Flex. Ensure Positioned is a direct child of Stack.
Input (Error State):
// Throws "Vertical viewport was given unbounded height"
Column(
children: <Widget>[
const Text('Header'),
ListView(
children: const <Widget>[
ListTile(title: Text('Item 1')),
ListTile(title: Text('Item 2')),
],
),
],
)
Output (Resolved State):
// Wrap ListView in Expanded to constrain its height to the remaining Column space
Column(
children: <Widget>[
const Text('Header'),
Expanded(
child: ListView(
children: const <Widget>[
ListTile(title: Text('Item 1')),
ListTile(title: Text('Item 2')),
],
),
),
],
)
Input (Error State):
// Throws "An InputDecorator...cannot have an unbounded width"
Row(
children: [
const Icon(Icons.search),
TextField(),
],
)
Output (Resolved State):
// Wrap TextField in Expanded to constrain its width to the remaining Row space
Row(
children: [
const Icon(Icons.search),
Expanded(
child: TextField(),
),
],
)
Input (Error State):
// Throws "A RenderFlex overflowed by X pixels on the right"
Row(
children: [
const Icon(Icons.info),
const Text('This is a very long text string that will definitely overflow the available screen width and cause a RenderFlex error.'),
],
)
Output (Resolved State):
// Wrap the Text widget in Expanded to force it to wrap within the available constraints
Row(
children: [
const Icon(Icons.info),
Expanded(
child: const Text('This is a very long text string that will definitely overflow the available screen width and cause a RenderFlex error.'),
),
],
)