flutter-implement
Skill0 starsChanged 5 months agoMITView on GitHub
Build Flutter screens, widgets, ChangeNotifier ViewModels, navigation, and feature code. Use when implementing UI, view models, repositories, or on-device Dart work.
In this repository26 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/000-project.mdcCursor rule
- .cursor/rules/accessibility.mdcCursor rule
- .cursor/rules/api-integration.mdcCursor rule
- .cursor/rules/architecture.mdcCursor rule
- .cursor/rules/dart-style.mdcCursor rule
- .cursor/rules/design-system.mdcCursor rule
- .cursor/rules/flutter-ui.mdcCursor rule
- .cursor/rules/security.mdcCursor rule
- .cursor/rules/state-management.mdcCursor rule
- .cursor/rules/testing.mdcCursor rule
- doubt-reviewSkill
- fix-dependenciesSkill
- flutter-componentSkill
- generate-mocksSkill
- grind-until-greenSkill
- implement-tddSkill
- monitor-terminalSkill
- plan-featureSkill
- repo-navigatorSkill
- review-codeSkill
- save-contextSkill
- suggest-ruleSkill
- write-commitSkill
- write-readmeSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 1 is distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Use when building or modifying in-app Dart code.
- Very specific: line 12
Read docs/ARCHITECTURE.md and check for similar existing code
- Very specific: line 40
No business logic in build
- Very specific: line 69
Run flutter analyze --fatal-infos and flutter test
- Very specific: line 70
Update docs/DECISIONS.md if architecture changed
- Very specific: line 71
Use review-code skill when user requests review
- Distinctive: line 88
Use Riverpod or flutter_riverpod
- Very specific: line 90
Add dependencies without user approval + docs/DECISIONS.md
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Flutter implementation
Use when building or modifying in-app Dart code. Follow .cursor/rules/architecture.mdc, state-management.mdc, and design-system.mdc.
Before coding
- Read
docs/ARCHITECTURE.mdand check for similar existing code - List files to create/modify (5–10 lines) — confirm with user if scope is unclear
- For new feature slices, prefer
mason make featurefrombricks/feature/, then adapt the generated files - Match folder layout:
features/<feature>/{data,domain?,presentation}/
Stack context
provider+ChangeNotifierViewModels — no Riverpod- go_router, freezed for models and sealed UI/error states
- Design tokens from
lib/design_system/tokens/ - l10n for user-visible strings
- Repositories return
Future<Result<T, Failure>>; inject viaMultiProvider
Implementation checklist
Structure
- One screen / ViewModel / repository per file
- ViewModels in
presentation/view_models/ - Register new repos/services/ViewModels in
app/dependencies.dart data/services/per data source; repositories above services
ViewModels
- Extend
ChangeNotifier; private repository fields - Explicit loading/error/data fields or sealed UI state
notifyListeners()after state changes; clean up indispose()
Views
context.watch<ViewModel>()to rebuild;context.read<ViewModel>()in callbacks- No business logic in
build Semanticson interactive widgets; touch ≥48dp (Material) / ≥44pt (Cupertino)ListView.builderfor long lists;Selectorto narrow rebuilds
Data
- No
Supabase.instance.clientin widgets or ViewModels accessing globals - Map errors through
core/errors/error_mapper.dart
Routing
GoRouterinapp/router.dart- Inject ViewModels/repos in route
builderviacontext.read() - Auth:
refreshListenableon auth ViewModel (ChangeNotifier) context.go()/context.push()— notNavigator.push
Tests to add (required)
Per .cursor/rules/testing.mdc — all rows apply; no skipping.
| Code | Test |
| Pure function / mapper | unit test |
| ViewModel | unit test with fake repository |
| Repository | unit test with fake service or Mockito client |
| Design-system widget | widget + golden (light + dark) |
| Screen | happy path + one error path widget test |
Before finishing
- Run
flutter analyze --fatal-infosandflutter test - Update
docs/DECISIONS.mdif architecture changed - Use
review-codeskill when user requests review
Output format
## Files touched
- ...
## Tests added
- ...
## Open questions
- ...Never
- Use Riverpod or flutter_riverpod
- Ship code without required tests (
testing.mdc) - Add dependencies without user approval +
docs/DECISIONS.md - Hardcode secrets outside
core/config/env.dart - Hardcode user-visible strings outside l10n
- Let views call repositories directly
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.

