flutter-dart-code-review

Reviews Flutter and Dart code against a library-agnostic checklist covering widgets, state management, performance, and security.

1|Updated Oct 11, 2025
One-click install
npx skills add https://github.com/ibytechaos/claude --skill flutter-dart-code-review-ibytechaos
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: flutter-dart-code-review
Source: https://github.com/ibytechaos/claude/tree/main/plugins/everything-claude-code/skills/flutter-dart-code-review
Command: npx skills add https://github.com/ibytechaos/claude --skill flutter-dart-code-review-ibytechaos

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Reviewing Flutter/Dart code consistently is hard because best practices span widgets, state management, performance, accessibility, and security, and they vary across state management libraries. This Skill provides a comprehensive, library-agnostic review checklist so no critical category is missed during code review. ## Core Features & Use Cases - Library-agnostic state management review: Covers BLoC, Riverpod, Provider, GetX, MobX, and Signals with a mapping table of universal principles to each solution's APIs. - 15 review categories: Widget best practices, Dart language pitfalls, performance, testing, accessibility, security, navigation, error handling, i18n, DI, static analysis, and package hygiene. - Concrete code examples: Illustrates anti-patterns like boolean flag state soup versus sealed-class state modeling. - Use Case: Before merging a Flutter pull request, run this checklist to catch issues like BuildContext used after async gaps, missing const constructors, hardcoded secrets, or non-exhaustive state handling. ## Quick Start Review my Flutter project's lib/ directory using the flutter-dart-code-review checklist and report violations by category.

Frequently Asked Questions about flutter-dart-code-review

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

FAQPage Schema
How do I review Flutter code for best practices?

Use a structured checklist covering widget decomposition, const usage, state management architecture, performance, testing, accessibility, and security. This Skill provides 15 review categories with concrete pass/fail criteria applicable to any Flutter project.

What should I check in a Dart code review?

Check for implicit dynamic types, excessive null-assertion operators, broad catch clauses, unused async modifiers, late overuse, and missing Dart 3 pattern matching. Also verify strict analyzer settings like strict-casts and strict-inference in analysis_options.yaml.

Does this checklist work with Riverpod, BLoC, and GetX?

Yes, the state management section is library-agnostic and includes a mapping table translating universal principles to BLoC, Riverpod, Provider, GetX, MobX, Signals, and built-in setState. Solution-specific conventions like Riverpod's ref.watch chains are addressed individually.

How should Flutter apps model loading and error states?

Use sealed classes, union variants, or AsyncValue instead of boolean flags like isLoading and hasError, which allow impossible state combinations. Every async operation should model loading, success, and error as distinct exhaustive states.

Why does BuildContext cause crashes after async gaps?

Using BuildContext after an await without checking context.mounted can reference a disposed widget, causing crashes. Always verify the widget is still mounted before navigation, dialogs, or setState in async callbacks, and never store BuildContext in singletons.

What are the limitations of a checklist-based code review?

A checklist identifies known anti-patterns but cannot execute the app, measure actual runtime performance, or verify visual output. Combine it with flutter analyze in CI, widget tests, and profiling tools for complete coverage.