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).
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Use when writing, reviewing, refactoring, or planning Flutter/Dart code — screens, features, project structure, state management, folders, widgets, cubits/blocs, repositories, services, or tests.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
설치 방법 보기설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.
Standards for building maintainable Flutter apps, distilled from the official Flutter architecture guide and LeanCode's experience shipping 40+ Flutter projects (including a 30-developer banking app). Apply these when writing new code; when touching existing code, prefer consistency with the surrounding codebase and raise conflicts with these standards rather than silently rewriting.
Read the reference file that matches the task. Read more than one when tasks overlap (e.g. a new feature touches both structure and coding style).
| Task | Read |
|---|---|
| Design layers, decide where logic lives, MVVM, repositories/services | references/architecture-layers.md |
| Create/organize a feature, folder structure, state management wiring | references/feature-structure.md |
| Write or review Dart/Flutter code, widgets, tests, lints | references/dart-coding-practices.md |
| Multi-team/multi-package apps, monorepo, navigation, localization, API contracts, E2E tests | references/enterprise-scale.md |
| App localization setup, reusable UI package string ownership, language picker visibility | references/localization-package-boundaries.md |
For a quick task (small widget fix, one-line review comment), the core rules below may be enough on their own.
View → ViewModel → Repository → Service. Lower layers never import upper
layers. Repositories never depend on each other.BuildContext.blocs/, widgets/, models/ buckets that scatter a
feature across the tree.Container. Use Padding,
SizedBox, ColoredBox, DecoratedBox, Center — they are const-able
and self-describing. Container is fine only when combining several
properties at once.if (x case final v?)), switch
expressions with exhaustiveness, records and destructuring, collection
if/for/spreads instead of .add() loops, expression bodies for
pass-through async functions (no redundant async/await).Sliver so misuse in the wrong
scroll context is caught at a glance.isEmpty, throwsA,
isA, completion) and minimize dependencies — plain Text/SizedBox
over design-system widgets in test fixtures. Test cubits/view models in
isolation from the widget tree.// ignore: gets a reason on the same or preceding line. Log
errors with dedicated error/stackTrace parameters, never string
interpolation.Check, in order of importance:
BuildContext in business logic?// ignore:, string-interpolated error logs, deprecated
patterns still spreading?leancode_lint or equivalent + custom rules) —
retrofitting is far more expensive.Defaults that these standards assume (swap for project-local equivalents when the codebase already uses something else):
bloc (Cubit) + freezed for union-type states;
bloc_presentation for one-off UI eventsprovider scoped to widget subtrees (accepting its lack of
compile-time safety as the lesser evil)flutter_hooksmelosflutter_localizations + intl with .arb filesleancode_lintpatrolThe official Flutter guide is state-management-agnostic (MVVM with ChangeNotifier works too); what matters is the layer separation, not the package. See the reference files for rationale and trade-offs.
아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.
로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.
아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.
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).
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Use when creating a feature, designing folder structure, adding repositories/services/view models, wiring dependency injection, or deciding which layer owns logic.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
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.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Use when asked to review a PR, MR, branch, or diff, audit changed files, or check code quality.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Use when writing switch statements, refactoring if-else chains, creating data classes, choosing records vs classes, destructuring values, or modernizing pre-Dart-3 code.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Use when building AI agents in Dart, implementing Genkit flows or tools, integrating LLMs into Dart or Flutter applications, or using Genkit Dart plugins.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.