본문으로 건너뛰기
cccskills
무료GitHub에 공개

flutter-errors

Use when hitting layout errors (RenderFlex overflow, unbounded constraints, RenderBox not laid out), scroll errors, or setState-during-build errors.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md3.2 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

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 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 for a deeper understanding of how constraints propagate.

References

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Use when working on accessibility, a11y, WCAG, ARIA, screen readers, keyboard nav, focus order, contrast, alt text, captions, reduced motion, or target sizes; not language/culture/device (see inclusive-design).

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

evanca/flutter-ai-rules6532026년 10월 10일 업데이트

Use when creating a feature, designing folder structure, adding repositories/services/view models, wiring dependency injection, or deciding which layer owns logic.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

evanca/flutter-ai-rules6532026년 10월 10일 업데이트

bloc

무료

Use when creating a Cubit or Bloc, modeling state with sealed classes or status enums, wiring BlocBuilder/BlocListener/BlocProvider, writing bloc tests, or choosing between Cubit and Bloc.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

evanca/flutter-ai-rules6532026년 10월 10일 업데이트

Use when asked to review a PR, MR, branch, or diff, audit changed files, or check code quality.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

evanca/flutter-ai-rules6532026년 10월 10일 업데이트

Use when writing switch statements, refactoring if-else chains, creating data classes, choosing records vs classes, destructuring values, or modernizing pre-Dart-3 code.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

evanca/flutter-ai-rules6532026년 10월 10일 업데이트

Use when building AI agents in Dart, implementing Genkit flows or tools, integrating LLMs into Dart or Flutter applications, or using Genkit Dart plugins.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

evanca/flutter-ai-rules6532026년 10월 10일 업데이트

evanca의 스킬 모두 보기

이 스킬의 문제 신고