riverpod-family

Manage Riverpod state with family providers for parameterized caching.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps manage complex state in Riverpod by allowing providers to accept parameters, creating independent states for each unique parameter combination.

Core Features & Use Cases

  • Parameterized Providers: Create providers that depend on external values like IDs, pagination tokens, or search queries.
  • Independent Caching: Each parameter combination gets its own cached state, preventing interference and optimizing memory usage.
  • Use Case: Fetching user profiles by ID, where each user's data is cached independently based on their unique ID.

Quick Start

Watch the user provider for the ID 'abc-123'.

Frequently Asked Questions about riverpod-family

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

FAQPage Schema
How do I manage state with dynamic parameters in Riverpod?

To manage state with dynamic parameters in Riverpod, use family providers to pass external values like IDs or search queries, creating independent states for each unique parameter combination.

How does caching work when fetching data by ID in Flutter?

Caching data by ID in Flutter works by assigning a family provider to each ID, which ensures each parameter combination gets its own cached state to prevent interference and optimize memory.

Can I use auto-disposal with parameterized providers in Riverpod?

Yes, you can use auto-disposal with parameterized providers in Riverpod, as family providers support both auto-disposal and parameter overriding during tests alongside functional and Notifier-based implementations.

What is the best way to handle pagination state in Flutter?

The best way to handle pagination state in Flutter is using Riverpod family providers, which manage state dependent on dynamic input like pagination tokens while caching each token combination independently.

How do I override family provider parameters in Riverpod tests?

To override family provider parameters in Riverpod tests, utilize the built-in parameter overriding support provided by family providers to inject mock data for specific parameter combinations.