flutter-errors
Use when hitting layout errors (RenderFlex overflow, unbounded constraints, RenderBox not laid out), scroll errors, or setState-during-build errors.
Works with
---
name: flutter-errors
description: Use when hitting layout errors (RenderFlex overflow, unbounded constraints, RenderBox not laid out), scroll errors, or setState-during-build errors.
license: MIT
---
# 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:
```dart
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`:
```dart
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:
```dart
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`:
```dart
@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](https://docs.flutter.dev/ui/layout/constraints) for a deeper understanding of how constraints propagate.
## References
- [Flutter Website GitHub Repository](https://github.com/flutter/website)More Mobile skills
animation-vocabulary
emilkowalski/skills
Reverse-lookup glossary that turns a vague description of a web animation or motion effect into its exact term ("the bouncy thing when a popover opens" → Pop in; "the iOS rubber-band scroll" → Rubber-banding). Use when the user asks "what's it called when…", or describes a motion effect without knowing its name and wants the right word to prompt an AI or designer with. For naming an effect, not designing or building one.
cross-border-ecommerce
nexscope-ai/ecommerce-skills
Cross-border e-commerce expansion advisor. Scores target markets on 8 weighted dimensions (market size, ecommerce penetration, competition, regulatory complexity, logistics infrastructure, payment ecosystem, cultural distance, IP protection), compares 5 fulfillment models with cost and transit data, provides country-by-country tax/duty compliance guides (EU VAT/IOSS, UK VAT, US sales tax, CA GST, AU GST, JP consumption tax), maps local payment preferences by market, and builds a phased expansion roadmap. No API key required.
developing-genkit-dart
firebase/agent-skills
Generates code and provides documentation for the Genkit Dart SDK. Use when the user asks to build AI agents in Dart, use Genkit flows, or integrate LLMs into Dart/Flutter applications.

