← ClaudeAtlas

flutter-riverpod-mvvmlisted

Build Flutter features on Riverpod code generation and MVVM, with a repository layer that returns Either<Failure, T>, a sealed failure hierarchy, exhaustive four-state UI, and no service locator. Use when writing or reviewing any Flutter or Dart feature, adding a screen, a provider, a repository or a model, wiring networking or auth refresh, deciding where a file goes, or when a widget is doing work that belongs in a ViewModel. Triggers on Flutter, Dart, Riverpod, @riverpod, ProviderScope, ref.watch, AsyncValue, go_router, fpdart, Either, build_runner, json_serializable, shadcn_ui, MVVM, repository pattern.
Udhay-Adithya/skills · ★ 0 · AI & Automation · score 70
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