riverpod-from-provider

Migrate Flutter state management from Provider to Riverpod with ref.watch and ConsumerWidget.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Migrates Flutter state management from Provider to Riverpod by guiding changes to ChangeNotifierProvider, ProxyProvider, ref.watch, and ConsumerWidget, and by introducing .family and autoDispose for safer lifecycle handling.

Core Features & Use Cases

  • Step-by-step migration guidance from ChangeNotifierProvider and ProxyProvider to Riverpod
  • Replace context.watch/read with ref.watch/ref.read, adopt ConsumerWidget, and leverage .family and autoDispose for parameterized and disposed state
  • Supports incremental migration workflows and comparisons between Provider and Riverpod

Quick Start

Wrap the app with ProviderScope and migrate providers one by one, starting with ChangeNotifierProvider and then ProxyProvider using ref.watch.

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 from ChangeNotifierProvider to Riverpod?

To migrate from ChangeNotifierProvider to Riverpod, replace context.watch and context.read with ref.watch and ref.read, adopt ConsumerWidget, and move providers one by one inside a ProviderScope wrapper for safe incremental updates.

What is the best way to replace ProxyProvider with Riverpod?

The best way to replace ProxyProvider with Riverpod is using ref.watch to establish dependencies directly within your providers, which automatically handles parameterized state and dependency updates without manual proxy configurations.

Can I migrate my Flutter app from Provider to Riverpod incrementally?

Yes, you can migrate from Provider to Riverpod incrementally by wrapping your app with ProviderScope and migrating providers one by one, starting with ChangeNotifierProvider before moving to ProxyProvider using ref.watch.

How do ref.watch and ConsumerWidget work together in Riverpod?

ref.watch and ConsumerWidget work together in Riverpod by allowing your Flutter widgets to subscribe to provider state changes directly, replacing the need for context.watch and ensuring widgets rebuild safely when observed state updates.

When should I use autoDispose and .family during Riverpod migration?

You should use autoDispose and .family during Riverpod migration to manage lifecycle safely, disposing unused state automatically and passing arguments to providers for parameterized state handling.

Why does context.watch fail after migrating to Riverpod?

context.watch fails after migrating to Riverpod because state management shifts to ref.watch, requiring widgets to extend ConsumerWidget instead of StatelessWidget to access the ref object for safe state subscriptions.