riverpod-from-provider

Migrate Flutter apps from package:provider to Riverpod with guided steps.

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

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 solution to the more modern and robust Riverpod library, simplifying complex state management patterns.

Core Features & Use Cases

  • Guided Migration: Provides step-by-step guidance for transitioning from ChangeNotifierProvider and ProxyProvider to Riverpod equivalents.
  • Incremental Adoption: Supports running Provider and Riverpod in parallel during migration.
  • Key Concepts Explained: Clarifies differences in provider definition, state reading, consumer widgets, scoping, and parameterization (.family, autoDispose).
  • Use Case: You have an existing Flutter app using package:provider and want to leverage Riverpod's benefits like improved testability and compile-time safety. This skill will guide you through replacing your ChangeNotifierProvider with NotifierProvider and ProxyProvider with ref.watch.

Quick Start

Use the riverpod-from-provider skill to understand how to replace a ChangeNotifierProvider with a Riverpod 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 your ChangeNotifierProvider with NotifierProvider and swap ProxyProvider dependencies for Riverpod's ref.watch. This allows incremental adoption so both state management solutions can run in parallel.

What is the Riverpod equivalent of ProxyProvider for state dependencies?

The Riverpod equivalent of ProxyProvider is using ref.watch inside your Notifier to read and combine other provider states. This approach provides compile-time safety and replaces context-based state access with direct provider dependencies.

Can I run Provider and Riverpod in parallel during a Flutter migration?

Yes, you can run Provider and Riverpod in parallel during incremental migration. This allows you to transition your Flutter app's state management gradually by replacing individual ChangeNotifierProvider instances with Riverpod NotifierProvider over time.

How do I handle autoDispose and parameterization when migrating to Riverpod?

When migrating to Riverpod, you handle automatic state disposal and parameterization using the autoDispose modifier and the .family method. These replace manual provider lifecycle management with automatic cleanup and parameterized state access.

Why should I switch from package:provider to Riverpod for Flutter state management?

You should switch from package:provider to Riverpod to gain improved testability and compile-time safety for your Flutter state management. Riverpod removes context-based state access dependencies, making your providers more robust and easier to test independently.

How do I replace context-based state access when moving to Riverpod?

To replace context-based state access when moving to Riverpod, use ref.watch within ConsumerWidget or Notifier classes instead of Provider.of. This decouples state reading from the BuildContext, enabling safer and more testable state management.