flutter
Flutter development with Riverpod state management, Freezed, go_router, and mocktail testing
By alinaqi · 732 installs
npx skills add alinaqi/maggy --skill flutter
Source repository · Upstream listing
Flutter Skill
Project Structure
Riverpod State Management
Provider Types
Notifier Pattern
AsyncValue Handling
ref Methods
Freezed Data Models
Model Definition
Using Freezed Unions
go router Navigation
Router Configuration
Navigation
Widget Patterns
ConsumerWidget vs ConsumerStatefulWidget
HookConsumerWidget (with flutter hooks)
Testing with Mocktail
Unit Tests
Widget Tests
pubspec.yaml
GitHub Actions
analysis options.yaml
Flutter Anti Patterns
❌ Provider without autoDispose Use .autoDispose to prevent memory leaks
❌ watch in callbacks Use ref.read() in onPressed/callbacks, not ref.watch()
❌ Business logic in widgets Move to Notifiers/providers
❌ Mutable state in providers Use Freezed for immutable models
❌ Not using AsyncValue Handle loading/error states with when()
❌ setState with Riverpod Use providers for shared state
❌ Passing ref to functions Keep ref usage within widgets/providers
❌ Deeply nested Consumer Use ConsumerWidget instead
❌ Not using family for params Use .family for parameterized providers
❌ Global GoRouter instance Use Provider for router with redirect logic
❌ BuildContext across async Store values before await, not context
❌ Ignoring dispose Clean up controllers in ConsumerStatefulWidget