
Flutter Dart Code Review
Review Flutter and Dart changes with a library-agnostic checklist covering architecture, state management, performance, a11y, and security before you merge or ship.
Overview
Flutter/Dart Code Review Best Practices is an agent skill most often used in Ship (also Build) that applies a library-agnostic Flutter and Dart code review checklist before you merge mobile changes.
Install
npx skills add https://github.com/affaan-m/everything-claude-code --skill flutter-dart-code-reviewWhat is this skill?
- Library-agnostic review across BLoC, Riverpod, Provider, GetX, MobX, and Signals
- General project health checklist: folder structure, separation of concerns, and lint discipline
- Dart pitfall pass: strict casts/inference, null safety, and implicit dynamic
- Performance, accessibility, security, and clean-architecture review sections
- Explicit rule to keep business logic out of presentational widgets
- Multi-section checklist starting with General Project Health and Dart Language Pitfalls
- Explicit coverage of six state management families: BLoC, Riverpod, Provider, GetX, MobX, Signals
Adoption & trust: 4.2k installs on skills.sh; 210k GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
Your Flutter PR mixes UI and business logic, weak null-safety habits, and inconsistent structure, and you lack a consistent review rubric across state-management choices.
Who is it for?
Solo builders and small teams shipping Flutter apps who want PR reviews that work whether they use Riverpod, BLoC, or Provider.
Skip if: Native-only iOS/Android codebases, backend-only Dart services with no Flutter UI, or teams that want auto-fix codegen instead of a review checklist.
When should I use this skill?
Reviewing Flutter or Dart application code for architecture, state management, performance, accessibility, or security before merge.
What do I get? / Deliverables
You get a structured review against architecture, Dart idioms, performance, accessibility, and security checklists so issues are caught before ship.
- Checklist-based review findings grouped by architecture, Dart, performance, a11y, and security
- Actionable fixes for lint, null-safety, and widget layering issues
- Dependency and generated-file hygiene notes tied to pubspec and .g.dart conventions
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
Canonical shelf is Ship because the skill is a structured review gate before release, even though teams can run it continuously during Build. Review is the primary activity—checklists for widgets, Dart idioms, and architecture—not authoring greenfield UI from scratch.
Where it fits
Run the checklist on a feature PR that introduces new Riverpod providers and UI widgets.
Audit folder structure and ban business logic from widgets during a feature-first refactor.
Cross-check logging, generated files, and analyzer strictness before a store build.
How it compares
Use instead of ad-hoc "looks good" mobile reviews when you need a repeatable Flutter/Dart rubric, not a generic linter report alone.
Common Questions / FAQ
Who is flutter-dart-code-review for?
Flutter developers, indie mobile founders, and agent users who want consistent PR reviews across widgets, Dart strictness, and multiple state-management libraries.
When should I use flutter-dart-code-review?
Use it in Ship before merging or releasing, and in Build while refactoring features, tightening analysis_options.yaml, or auditing dependencies in pubspec.yaml.
Is flutter-dart-code-review safe to install?
It is a read-only review procedure with no required tools in the skill; confirm vendor trust via the Security Audits panel on this Prism page.
SKILL.md
READMESKILL.md - Flutter Dart Code Review
# Flutter/Dart Code Review Best Practices Comprehensive, library-agnostic checklist for reviewing Flutter/Dart applications. These principles apply regardless of which state management solution, routing library, or DI framework is used. --- ## 1. General Project Health - [ ] Project follows consistent folder structure (feature-first or layer-first) - [ ] Proper separation of concerns: UI, business logic, data layers - [ ] No business logic in widgets; widgets are purely presentational - [ ] `pubspec.yaml` is clean — no unused dependencies, versions pinned appropriately - [ ] `analysis_options.yaml` includes a strict lint set with strict analyzer settings enabled - [ ] No `print()` statements in production code — use `dart:developer` `log()` or a logging package - [ ] Generated files (`.g.dart`, `.freezed.dart`, `.gr.dart`) are up-to-date or in `.gitignore` - [ ] Platform-specific code isolated behind abstractions --- ## 2. Dart Language Pitfalls - [ ] **Implicit dynamic**: Missing type annotations leading to `dynamic` — enable `strict-casts`, `strict-inference`, `strict-raw-types` - [ ] **Null safety misuse**: Excessive `!` (bang operator) instead of proper null checks or Dart 3 pattern matching (`if (value case var v?)`) - [ ] **Type promotion failures**: Using `this.field` where local variable promotion would work - [ ] **Catching too broadly**: `catch (e)` without `on` clause; always specify exception types - [ ] **Catching `Error`**: `Error` subtypes indicate bugs and should not be caught - [ ] **Unused `async`**: Functions marked `async` that never `await` — unnecessary overhead - [ ] **`late` overuse**: `late` used where nullable or constructor initialization would be safer; defers errors to runtime - [ ] **String concatenation in loops**: Use `StringBuffer` instead of `+` for iterative string building - [ ] **Mutable state in `const` contexts**: Fields in `const` constructor classes should not be mutable - [ ] **Ignoring `Future` return values**: Use `await` or explicitly call `unawaited()` to signal intent - [ ] **`var` where `final` works**: Prefer `final` for locals and `const` for compile-time constants - [ ] **Relative imports**: Use `package:` imports for consistency - [ ] **Mutable collections exposed**: Public APIs should return unmodifiable views, not raw `List`/`Map` - [ ] **Missing Dart 3 pattern matching**: Prefer switch expressions and `if-case` over verbose `is` checks and manual casting - [ ] **Throwaway classes for multiple returns**: Use Dart 3 records `(String, int)` instead of single-use DTOs - [ ] **`print()` in production code**: Use `dart:developer` `log()` or the project's logging package; `print()` has no log levels and cannot be filtered --- ## 3. Widget Best Practices ### Widget decomposition: - [ ] No single widget with a `build()` method exceeding ~80-100 lines - [ ] Widgets split by encapsulation AND by how they change (rebuild boundaries) - [ ] Private `_build*()` helper methods that return widgets are extracted to separate widget classes (enables element reuse, const propagation, and framework optimizations) - [ ] Stateless widgets preferred over Stateful where no mutable local state is needed - [ ] Extracted widgets are in separate files when reusable ### Const usage: - [ ] `const` constructors used wherever possible — prevents unnecessary rebuilds - [ ] `const` literals for collections that don't change (`const []`, `const {}`) - [ ] Constructor is declared `const` when all fields are final ### Key usage: - [ ] `ValueKey` used in lists/grids to preserve state across reorders - [ ] `GlobalKey` used sparingly — only when accessing state across the tree is truly needed - [ ] `UniqueKey