flutter-errors
Skill669 starsChanged 3 months agoMITView on GitHub
Use when hitting layout errors (RenderFlex overflow, unbounded constraints, RenderBox not laid out), scroll errors, or setState-during-build errors.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- kitloomlk-stack/mobile-apps-kitword for word, first seen Oct 15, 2026
Other versions1 project uses a version of this.
Word for word · 1
- kitloomlk-stack/mobile-apps-kit★ 0100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository36 other files it gives its agents.
- AGENTS.mdAGENTS.md
- accessibilitySkill
- architecture-feature-firstSkill
- blocSkill
- code-reviewSkill
- dart-3-updatesSkill
- developing-genkit-dartSkill
- effective-dartSkill
- firebase-aiSkill
- firebase-analyticsSkill
- firebase-app-checkSkill
- firebase-authSkill
- firebase-cloud-firestoreSkill
- firebase-cloud-functionsSkill
- firebase-crashlyticsSkill
- firebase-databaseSkill
- firebase-data-connectSkill
- firebase-in-app-messagingSkill
- firebase-messagingSkill
- firebase-remote-configSkill
- firebase-storageSkill
- flutter-app-architectureSkill
- flutter-best-practicesSkill
- flutter-change-notifierSkill
- flutterfire-configureSkill
- flutter-pre-cachingSkill
- flutter-use-column-row-firstSkill
- generate-images-with-firebase-aiSkill
- inclusive-designSkill
- mockitoSkill
- mocktailSkill
- patrol-e2e-testingSkill
- providerSkill
- revenuecat-testingSkill
- riverpodSkill
- testingSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 97
Fix: Ensure each scrollable widget has its own dedicated ScrollController instance.
- Distinctive: line 116
Use the Flutter Inspector (in DevTools) to visualize widget constraints.
- Very specific: line 118
Add debugPaintSizeEnabled = true.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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
ListViewinExpandedinside aColumn. - Give widgets an explicit
widthorheightviaSizedBoxorConstrainedBox.
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 yourmain()to paint layout bounds. - Refer to the Flutter constraints documentation for a deeper understanding of how constraints propagate.
References
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

