flutter-riverpod-mvvmlisted
Install: claude install-skill Udhay-Adithya/skills
# Flutter, Riverpod and MVVM
The architecture to follow in a Flutter app: four layers per feature, Riverpod as the
only dependency graph, failures as values rather than exceptions, and widgets that
cannot reach the network.
Read `references/layers.md` before adding a feature, `references/networking.md` before
touching a repository or an HTTP client, `references/testing.md` before writing a test,
and `references/design-system.md` before writing a widget.
## Stack
| Concern | Choice |
|---|---|
| State management | Riverpod with code generation (`@riverpod`) |
| Dependency injection | Riverpod providers and `ProviderScope` overrides. No GetIt, no service locator |
| Routing | `go_router` |
| Networking | `http.Client`, wrapped once for auth |
| Error handling | `fpdart`'s `Either<Failure, T>` |
| Serialization | `json_serializable` |
| Code generation | `build_runner` |
| UI | `shadcn_ui` |
| Charts | `fl_chart` |
| Session storage | `flutter_secure_storage` |
| Local database | `drift`, and only once a feature needs one |
| Formatting | `intl` |
| Tests | `flutter_test`, `mocktail`, `package:http/testing.dart` |
Versions live in `pubspec.yaml` and nowhere else. Add a package with `flutter pub add`
so its constraint is resolved when it is added, rather than copied out of a document
that has gone stale.
The four Riverpod packages (`flutter_riverpod`, `riverpod_annotation`,
`riverpod_generator`, `riverpod_lint`) pin each other. A caret range on one resolves
the lint plugin