flutter-patterns
Skill4 starsChanged 56 days agoMITView on GitHub
Provides production Flutter and Dart 3 patterns covering widget composition, state management choice (Riverpod, BLoC, plain ChangeNotifier), immutability with freezed and records, sealed-class state, async and streams, Firebase usage (Auth, Firestore, Functions), navigation, and widget/integration testing. Use when writing, reviewing, or architecting Flutter apps or Dart packages.
8 other projects use a version of this.
Adopted by
Most recently taken up by
- atstaeff/ai-agentstheir own version, first seen Nov 29, 2026
- HeyEddi-com/heyeddi-skillstheir own version, first seen Nov 27, 2026
- theyoungastronauts/polaristheir own version, first seen Nov 1, 2026
- qrvello/flutter-claude-codetheir own version, first seen Oct 9, 2026
- jahfaliabdulrahman-dev/hermes-skillstheir own version, first seen Oct 3, 2026
- seek888/claude-skillstheir own version, first seen Apr 9, 2026
Other versions8 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 8
- FaisalAlqarni/sp-ecc★ 9same name
- atstaeff/ai-agents★ 4same name
- theyoungastronauts/polaris★ 4same name
- jahfaliabdulrahman-dev/hermes-skills★ 1same name
- qrvello/flutter-claude-code★ 1same name
- HeyEddi-com/heyeddi-skills★ 0same name
- seek888/claude-skills★ 0same name
- terrene-foundation/pact★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository13 other files it gives its agents.
- assessSkill
- brainstormingSkill
- brew-ideaSkill
- compound-learningsSkill
- executing-plansSkill
- jump-startSkill
- milestone-planningSkill
- python-patternsSkill
- react-patternsSkill
- tdd-workflowSkill
- using-opmSkill
- verification-before-completionSkill
- writing-plansSkill
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 0 are distinctive, and 5 are very specific to this project.
0
Common
Most of the 7 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
Always-true conventions (formatting, null safety, sealed types, errors, architecture, mobile security, test tooling) live in OPM's rules …
- Very specific: line 37
Read references/dart-idioms-and-state.md when handling nulls, modelling state or data classes (sealed, freezed, records), or writing …
- Very specific: line 38
Read references/widgets-and-navigation.md when composing widgets, scoping rebuilds, or setting up go_router.
- Very specific: line 39
Read references/async-firebase-and-errors.md when writing async or stream code, using Firebase, or wiring error handling.
- Very specific: line 40
Read references/testing.md when writing unit, widget, golden, or integration tests.
“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Flutter Patterns
Small const widgets, immutable state modelled with sealed types, side effects in a thin layer above the UI, and tests at the widget boundary. Dart 3 features (records, patterns, sealed classes) are assumed.
Always-true conventions (formatting, null safety, sealed types, errors, architecture, mobile
security, test tooling) live in OPM's rules dart/coding-style.md and dart/testing.md
(.claude/rules/opm/dart/ once installed, rules/dart/ in the plugin). This skill keeps the
patterns and worked examples.
When to use
- Starting a Flutter feature and choosing how to structure widgets and state.
- Reviewing Dart for null safety, immutability, async correctness, or rebuild scope.
- Integrating Firebase services in a Flutter app.
- Writing widget, unit, or integration tests.
State management
One approach per app: rule dart/coding-style.md (Architecture).
| Situation | Choice |
| Local, ephemeral UI state (a toggle, a text field, an animation) | StatefulWidget + setState |
| App or feature state, most new apps | Riverpod (code-generated providers) |
| Teams that want explicit event -> state transitions and event logs | BLoC / Cubit |
| Tiny app or package with no dependency budget | ChangeNotifier + ListenableBuilder |
References
- Read references/dart-idioms-and-state.md when handling nulls, modelling state or data classes (sealed, freezed, records), or writing Riverpod or Cubit code.
- Read references/widgets-and-navigation.md when composing widgets, scoping rebuilds, or setting up
go_router. - Read references/async-firebase-and-errors.md when writing async or stream code, using Firebase, or wiring error handling.
- Read references/testing.md when writing unit, widget, golden, or integration tests.
Anti-patterns
user!.namewhereuser?.name ?? defaultwas possible.- Widget-returning private methods instead of widget classes.
setStatefor anything read outside the widget.contextused after anawaitwithout amountedcheck.- Firestore queries or
FirebaseAuth.instancecalls insidebuild. - A
ColumninsideSingleChildScrollViewfor a long list. - Catching
Exceptionin the UI and showinge.toString(). - Tests that pump the whole app to check one widget.
Review checklist
dart analyzeclean;flutter testgreen.- State is sealed/immutable; updates create new objects.
- Rebuild scope is minimal;
constused where possible. - Every
awaitin a widget is followed by amountedguard before usingcontext. - Firebase is behind repositories with
withConverter; rules cover every access. - Subscriptions and controllers are disposed.
- New behaviour has a widget or unit test that fails without it.
Related skills
opm:tdd-workflow-flutter testRED/GREEN cycle.opm:verification-before-completion(full gate) -dart analyzeandflutter testas the release gate.
<!-- Adapted from affaan-m/ecc (MIT) -->Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

