flutter-dart-code-review

Reviews Flutter and Dart code against widget, state management, performance, and security checklists.

Updated Mar 25, 2026
One-click install
npx skills add https://github.com/Femad-6/my-skills --skill flutter-dart-code-review-femad-6
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: flutter-dart-code-review
Source: https://github.com/Femad-6/my-skills/tree/main/.github/skills/flutter-dart-code-review
Command: npx skills add https://github.com/Femad-6/my-skills --skill flutter-dart-code-review-femad-6

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 library-agnostic checklist so reviewers catch common pitfalls systematically. ## Core Features & Use Cases - Comprehensive Review Checklist: Covers Dart language pitfalls, widget best practices, state management, performance, testing, accessibility, security, routing, error handling, i18n, DI, and static analysis. - State Management Agnostic: Maps universal principles to BLoC, Riverpod, Provider, GetX, MobX, Signals, and built-in setState via a quick-reference table. - Use Case: Before merging a pull request that adds a new Riverpod-based feature, run the checklist to verify immutable state classes, narrow Consumer scoping, proper disposal, and no BuildContext usage after async gaps. ## Quick Start Ask the AI to review your Flutter widget or state management code 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 discipline, performance, and security. This Skill provides category-by-category review items so reviewers can systematically flag issues like business logic in widgets or missing disposal.

What are common Dart code review pitfalls?

Common pitfalls include implicit dynamic types, excessive null-assertion operators, catching Error subtypes, unused async markers, and print() in production code. Enabling strict-casts, strict-inference, and strict-raw-types in analysis_options.yaml catches many of these automatically.

Does this checklist work with Riverpod and BLoC?

Yes, the checklist is library-agnostic and includes a quick-reference table mapping universal principles to BLoC, Riverpod, Provider, GetX, MobX, Signals, and setState. It flags solution-specific issues like bloc-to-bloc dependencies or missing autoDispose.

How do I prevent Flutter widget rebuild performance issues?

Use const constructors, scope state consumers narrowly, apply selectors to rebuild only on relevant field changes, and avoid expensive work in build(). RepaintBoundary and AnimatedBuilder child parameters further isolate repaints.

When should I not use boolean flags for Flutter state?

Avoid boolean flags like isLoading and hasError when states are mutually exclusive, since they allow impossible combinations. Use sealed classes, union variants, or AsyncValue so loading, success, and error states are exhaustive and unrepresentable when invalid.