riverpod-from-provider

Migrate Flutter apps from package:provider to Riverpod state management.

Updated Mar 15, 2026
One-click install
npx skills add https://github.com/dangdungvn/review_system_app --skill riverpod-from-provider-dangdungvn
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: riverpod-from-provider
Source: https://github.com/dangdungvn/review_system_app/tree/main/.github/skills/riverpod-from-provider
Command: npx skills add https://github.com/dangdungvn/review_system_app --skill riverpod-from-provider-dangdungvn

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps developers migrate their Flutter applications from the package:provider state management library to the more modern and robust Riverpod library, simplifying complex state management patterns.

Core Features & Use Cases

  • Incremental Migration: Facilitates a gradual transition from Provider to Riverpod, allowing both to coexist.
  • Provider Replacement: Guides on replacing ChangeNotifierProvider, ProxyProvider, and other Provider constructs with their Riverpod equivalents (NotifierProvider, ref.watch).
  • Riverpod Concepts: Explains key Riverpod features like autoDispose, .family, and ref.listen for improved state management.
  • Use Case: A developer has a large Flutter app using package:provider and wants to adopt Riverpod for its improved safety, testability, and composition. This Skill provides the roadmap and code examples for the migration.

Quick Start

Use the riverpod-from-provider skill to migrate a ChangeNotifierProvider to a NotifierProvider.

Frequently Asked Questions about riverpod-from-provider

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I migrate my Flutter app from Provider to Riverpod?

To migrate from Provider to Riverpod, replace ChangeNotifierProvider and ProxyProvider with Riverpod's NotifierProvider, and swap context.watch/read with ref.watch/read. You can adopt an incremental migration strategy allowing both libraries to coexist during the transition.

What is the difference between Provider and Riverpod for Flutter state management?

Provider relies on BuildContext for state lookup, whereas Riverpod uses independent ref objects, improving testability and safety. Riverpod also introduces modifiers like autoDispose and family for enhanced lifecycle control and dynamic state configuration.

Can I use Provider and Riverpod in the same Flutter project during migration?

Yes, you can use Provider and Riverpod in the same Flutter project. An incremental migration strategy allows both state management libraries to coexist, enabling you to transition widgets and providers to Riverpod gradually without rewriting the app at once.

How do I replace ProxyProvider when migrating to Riverpod?

To replace ProxyProvider in Riverpod, use NotifierProvider combined with ref.watch to handle dependencies. This approach allows your notifier to dynamically read other provider states and rebuild safely, replacing the proxy pattern with a more robust composition model.

When do I need to use autoDispose and family modifiers in Riverpod?

Use Riverpod's autoDispose modifier to automatically dispose of state when no longer listened to, preventing memory leaks. Use the family modifier to parameterize providers, allowing you to pass arguments dynamically and create distinct state instances based on input values.