| name | flutter-riverpod-change |
| description | Guide Dart, Flutter, Riverpod, Forui, routing, model, serializer, and UI-state changes in Genesix. Use when touching lib/features, lib/shared, providers, widgets, routes, generated Dart annotations, or Flutter package APIs. |
Flutter Riverpod Change
Use this skill before changing Flutter application code.
Workflow
- Read relevant local files and neighboring patterns.
- Check
pubspec.yaml before using third-party package APIs.
- Identify whether annotations require
dart run build_runner build -d.
- Keep feature code under
lib/features/<feature>/... and shared code under lib/shared/....
- Reuse Riverpod and UI patterns already present in the feature.
- Keep widgets presentation-focused; move business decisions out of UI.
Rules
- Prefer
@riverpod generator patterns when they match the feature and installed version.
- Do not introduce Hook-based or alternate state management unless already used or requested.
- Prefer Forui when it fits existing UI.
- Reuse shared widgets and utilities before creating new ones.
- Do not declare named nested functions; extract private methods, helpers, or widgets.
- Do not manually patch
*.g.dart or *.freezed.dart.
Validation
Run checks from AGENTS.md based on the changed surface. Use dart run build_runner build -d before dart analyze when generator annotations changed.