flutter-errors

Diagnose common Flutter layout and runtime errors with widget fixes.

2|Updated Aug 13, 2023
One-click install
npx skills add https://github.com/NNPopov/movie-theater-tickets --skill flutter-errors-nnpopov
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: flutter-errors
Source: https://github.com/NNPopov/movie-theater-tickets/tree/main/src/clients/.claude/skills/flutter-errors
Command: npx skills add https://github.com/NNPopov/movie-theater-tickets --skill flutter-errors-nnpopov

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers quickly diagnose and fix common Flutter runtime and layout errors that block UI development, such as overflow, constraint, scrolling, and build-phase state issues.

Core Features & Use Cases

  • Layout Error Diagnosis: Explains why RenderFlex overflow, unbounded constraint, and RenderBox layout failures happen.
  • UI Constraint Fixes: Recommends practical widget-tree changes like Expanded, Flexible, SizedBox, and ConstrainedBox to restore proper layout behavior.
  • State and Scroll Troubleshooting: Addresses setState-during-build problems and shared ScrollController conflicts with safe Flutter patterns.
  • Use Case: A developer can paste a Flutter error message and get a targeted fix for the widget hierarchy or state flow causing the issue.

Quick Start

Ask the Flutter Errors skill to analyze the Flutter error message and provide the most likely cause and fix for the affected widget tree.

Frequently Asked Questions about flutter-errors

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix a RenderFlex overflow error in Flutter?

Fix RenderFlex overflow by wrapping child widgets in Expanded or Flexible to distribute available space within the Flex widget hierarchy, preventing size constraint violations.

Why does my Flutter app crash with an unbounded constraints error?

Unbounded constraints errors occur when a widget receives infinite width or height; resolve them by applying SizedBox or ConstrainedBox to enforce strict layout boundaries.

How do I resolve setState called during build errors in Flutter?

Resolve setState-during-build mistakes by deferring state updates using addPostFrameCallback, ensuring widget tree state modifications execute safely after the current build phase completes.

What causes multiple scroll controllers attached to one ScrollController conflict?

Scroll controller conflicts happen when a single ScrollController is attached to multiple scrollable widgets; instantiate dedicated ScrollController instances for each scrolling view.

How do I fix InputDecorator width issues in Flutter?

Fix InputDecorator width constraints by wrapping the input widget in SizedBox or ConstrainedBox, enforcing bounded dimensions that satisfy layout requirements.

Can this skill diagnose RenderBox layout failures in Dart code?

Yes, it diagnoses RenderBox layout failures by analyzing Flutter UI code constraints and recommending direct widget tree adjustments to restore proper rendering behavior.