# rrousselgit/riverpod

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/rrousselgit-riverpod).**

7,315 stars · 1,091 forks · Dart · MIT

## Links

- GitHub: https://github.com/rrousselGit/riverpod
- Homepage: https://riverpod.dev
- awesome-repositories: https://awesome-repositories.com/repository/rrousselgit-riverpod.md

## Topics

`dart` `flutter` `hacktoberfest` `inheritedwidget` `provider` `riverpod` `service-locator` `state-management`

## Description

Riverpod is a reactive state management framework for Dart that manages application state through providers which automatically track dependencies and rebuild dependents when values change. It functions as an asynchronous data caching library, caching results of async operations and exposing loading, error, and data states to widgets without manual future handling. The framework includes a provider composition system that combines multiple providers into derived values that recompute automatically when any dependency changes, along with code generation for state providers that reduces boilerplate and ensures type safety.

The framework distinguishes itself through compile-time code generation that produces provider declarations from annotated Dart code, a signals-based reactivity model where providers automatically track dependencies and propagate changes without manual subscription management, and a dependency graph invalidation system that clears cached values and triggers recomputation when upstream providers change. Riverpod provides provider container scoping that creates isolated containers which can be nested for per-subtree overrides and state isolation, family provider parameterization that associates a single provider with multiple independent states keyed by unique parameter combinations, and disposal lifecycle management that automatically destroys provider state when no listeners remain with opt-in keep-alive for persistent resources.

Riverpod supports async data handling with automatic retry of failed providers using configurable delay and count, state persistence and restoration to local storage with schema migration support, and testing utilities that create isolated provider containers for unit tests without a widget tree. The framework includes a command-line migration tool that rewrites existing provider syntax to the new code-generation format automatically, lint rules that enforce best practices, and IDE refactorings for wrapping widgets in consumers. It also provides monitoring and observability through DevTools inspection of provider values and lifecycle events, along with performance optimizations including debouncing network requests, automatic disposal of unused state, and selective rebuilds based on property changes.

## Tags

### User Interface & Experience

- [Reactive State Management Libraries](https://awesome-repositories.com/f/user-interface-experience/reactive-state-management-libraries.md) — Provides a reactive state management framework for Dart with automatic dependency tracking and UI rebuilds.
- [State Controllers](https://awesome-repositories.com/f/user-interface-experience/radio-groups/state-controllers.md) — Provides direct access to provider state and underlying controller for advanced state manipulation. ([source](https://riverpod.dev/docs/migration/0.14.0_to_1.0.0))
- [Signal-Based Reactivity](https://awesome-repositories.com/f/user-interface-experience/signal-based-reactivity.md) — Providers automatically track dependencies and propagate changes to watchers without manual subscription management.
- [Scoped Provider Resolution](https://awesome-repositories.com/f/user-interface-experience/state-injection-patterns/scoped-dependency-injection/hierarchical-dependency-scopes/scoped-provider-resolution.md) — Enables dependent providers to correctly resolve scoped values through explicit dependency declarations. ([source](https://riverpod.dev/docs/concepts2/scoping))
- [Reusable Widget Logic](https://awesome-repositories.com/f/user-interface-experience/custom-widget-frameworks/custom-widget-implementation/singleton-widgets/reusable-widget-logic.md) — Extracts widget logic into reusable functions that can be shared across different widgets without code duplication. ([source](https://riverpod.dev/docs/concepts/about_hooks))

### Data & Databases

- [State Mutations](https://awesome-repositories.com/f/data-databases/graphql-integrations/mutation-handlers/state-mutations.md) — Exposes modifiable providers that widgets can call to update state and trigger rebuilds. ([source](https://riverpod.dev/docs/concepts2/providers))
- [Computational Result Caching](https://awesome-repositories.com/f/data-databases/key-value-stores/response-caching/computational-result-caching.md) — Caches computed values from providers and returns them on subsequent reads without re-execution. ([source](https://riverpod.dev/docs/concepts2/providers))
- [Parameterized Provider Caching](https://awesome-repositories.com/f/data-databases/redis-clients/caching-implementations/custom-cache-providers/parameterized-provider-caching.md) — Associates a single provider with multiple independent states keyed by unique parameter combinations for per-parameter caching. ([source](https://riverpod.dev/docs/concepts2/family))
- [In-Memory Storage Mocks](https://awesome-repositories.com/f/data-databases/data-engineering-infrastructure/data-persistence-storage/persistence-integration-tests/in-memory-storage-mocks.md) — Uses an in-memory database in place of a real device database to verify persistence behavior in tests. ([source](https://riverpod.dev/docs/concepts2/offline))
- [Refresh State Distinctions](https://awesome-repositories.com/f/data-databases/data-refresh-scheduling/initial-load-refresh/refresh-state-distinctions.md) — Provides a built-in mechanism to differentiate initial loading spinners from refresh indicators that preserve stale data. ([source](https://riverpod.dev/docs/how_to/pull_to_refresh))
- [Mutation State Resets](https://awesome-repositories.com/f/data-databases/graphql-integrations/mutation-handlers/state-mutations/mutation-state-resets.md) — Returns a mutation to its idle state either automatically when listeners detach or manually through a dedicated method. ([source](https://riverpod.dev/docs/concepts2/mutations))

### Programming Languages & Runtimes

- [Provider Parameterized Arguments](https://awesome-repositories.com/f/programming-languages-runtimes/function-argument-passing/provider-parameterized-arguments.md) — Provides parameterized provider arguments that enable per-input caching and retrieval. ([source](https://riverpod.dev/docs/concepts2/providers))

### Security & Cryptography

- [State Mutation Providers](https://awesome-repositories.com/f/security-cryptography/oauth-providers/custom-provider-implementations/configuration-providers/state-mutation-providers.md) — Defines class-based providers with public methods that external objects can call to mutate the provider's state. ([source](https://riverpod.dev/docs/concepts/about_code_generation))

### Software Engineering & Architecture

- [UI State Change Notifications](https://awesome-repositories.com/f/software-engineering-architecture/architectural-design-patterns/state-management/reactive-subscription-systems/state-change-subscriptions/state-change-broadcasting/ui-state-change-notifications.md) — Watches a provider from a widget and rebuilds only the parts of the UI that depend on that provider. ([source](https://riverpod.dev/docs/introduction/getting_started))
- [Async Operation Initiators](https://awesome-repositories.com/f/software-engineering-architecture/asynchronous-progress-tracking/operation-state-tracking/async-operation-initiators.md) — Initiates an asynchronous callback via a mutation object and tracks its execution state for UI feedback. ([source](https://riverpod.dev/docs/concepts2/mutations))
- [Compile-Time Code Generation](https://awesome-repositories.com/f/software-engineering-architecture/compile-time-code-generation.md) — Generates provider declarations from annotated Dart code during build, reducing boilerplate and ensuring type safety.
- [Incremental Recomputations](https://awesome-repositories.com/f/software-engineering-architecture/dataflow-frameworks/live-dataflow-graph-modifiers/incremental-recomputations.md) — Rebuilds derived data and triggers network requests only when their dependencies change, avoiding unnecessary work. ([source](https://riverpod.dev/))
- [Provider Parameterized Arguments](https://awesome-repositories.com/f/software-engineering-architecture/default-configuration-values/execution-parameter-configurations/application-parameter-configurators/runtime-parameter-configurators/metadata-parameter-passings/pattern-parameter-passings/provider-parameterized-arguments.md) — Supports named, optional, and default parameters in provider definitions for flexible state configuration. ([source](https://riverpod.dev/docs/concepts/about_code_generation))
- [Dependency Injection Providers](https://awesome-repositories.com/f/software-engineering-architecture/dependency-injection-providers.md) — Provides a provider-based dependency injection system with scoped overrides and lifecycle management for widget trees.
- [Derived Provider Composers](https://awesome-repositories.com/f/software-engineering-architecture/dependency-injection-providers/multi-value-providers/derived-provider-composers.md) — Combines multiple providers into derived values that recompute automatically when dependencies change.
- [Reactive Provider Composition](https://awesome-repositories.com/f/software-engineering-architecture/dependency-injection-providers/provider-grouping/reactive-provider-composition.md) — Combines multiple providers into derived values that recompute automatically when any dependency changes. ([source](https://riverpod.dev/docs/concepts2/providers))
- [Widget Tree Providers](https://awesome-repositories.com/f/software-engineering-architecture/dependency-injection-providers/widget-tree-providers.md) — Watches a provider inside a widget's build method and rebuilds the widget whenever the provider's value changes. ([source](https://riverpod.dev/docs/introduction/getting_started))
- [Provider State Disposals](https://awesome-repositories.com/f/software-engineering-architecture/observer-patterns/disposable-observers/automatic-subscription-disposals/provider-state-disposals.md) — Registers callbacks via ref.onDispose that run when a provider's state is destroyed, enabling cleanup of resources. ([source](https://riverpod.dev/docs/concepts2/auto_dispose))
- [Reactive Value Declarations](https://awesome-repositories.com/f/software-engineering-architecture/reactive-value-declarations.md) — Declares a piece of state as a provider so widgets can read and react to its changes. ([source](https://riverpod.dev/docs/introduction/getting_started))
- [Source Generation Providers](https://awesome-repositories.com/f/software-engineering-architecture/schema-to-code-generators/generation-pipeline-customization/source-generation-providers.md) — Uses a code generator to produce provider declarations from annotated classes, reducing boilerplate and ensuring type safety. ([source](https://riverpod.dev/docs/from_provider/quickstart))
- [Provider Code Generators](https://awesome-repositories.com/f/software-engineering-architecture/schema-to-code-generators/generation-pipeline-customization/source-generation-providers/provider-code-generators.md) — Generates provider declarations from annotated classes, reducing boilerplate and ensuring type safety.
- [Shared State Management](https://awesome-repositories.com/f/software-engineering-architecture/shared-state-management.md) — Places shared state code in any file or package and makes it accessible to multiple widgets. ([source](https://riverpod.dev/))
- [Declarative State Managers](https://awesome-repositories.com/f/software-engineering-architecture/software-architecture/architectural-patterns/layering-presentation/state-management-patterns/declarative-state-managers.md) — Declares providers that expose values and automatically rebuild dependents when values change. ([source](https://riverpod.dev/docs/introduction/getting_started))
- [Scoped State Containers](https://awesome-repositories.com/f/software-engineering-architecture/state-management/scoped-state-containers.md) — Creates isolated provider containers that can be nested for per-subtree overrides and state isolation.
- [Parameterized Provider Instances](https://awesome-repositories.com/f/software-engineering-architecture/dependency-injection-providers/provider-grouping/parameterized-provider-instances.md) — Associates a single provider with multiple independent states keyed by unique parameter combinations.
- [Parameterized Provider Overrides](https://awesome-repositories.com/f/software-engineering-architecture/dependency-injection-providers/provider-grouping/parameterized-provider-instances/parameterized-provider-overrides.md) — Replaces the state of a family provider for a specific parameter combination or for all combinations during testing. ([source](https://riverpod.dev/docs/concepts2/family))
- [Provider Testing Containers](https://awesome-repositories.com/f/software-engineering-architecture/dependency-injection-providers/widget-tree-providers/provider-testing-containers.md) — Creates isolated provider containers for unit tests with mock overrides and state inspection.
- [Provider Future Awaiters](https://awesome-repositories.com/f/software-engineering-architecture/integration-extensibility/dependency-injection/asynchronous-providers/provider-future-awaiters.md) — Reads the .future property of a provider to wait for asynchronous operations to complete before making assertions. ([source](https://riverpod.dev/docs/how_to/testing))
- [Provider State Persistence](https://awesome-repositories.com/f/software-engineering-architecture/plugin-version-management/state-restoration/provider-state-persistence.md) — Implements state persistence and restoration for providers with schema migration support.
- [Parameterized Mutation Instances](https://awesome-repositories.com/f/software-engineering-architecture/service-configuration/scoped-service-instances/parameterized-mutation-instances.md) — Creates distinct instances of the same mutation by passing unique parameters, allowing parallel operations. ([source](https://riverpod.dev/docs/concepts2/mutations))

### Web Development

- [Lifecycle State Tracking](https://awesome-repositories.com/f/web-development/asynchronous-state-management/loading-state-indicators/lifecycle-state-tracking.md) — Monitors the progress of an asynchronous operation through pending, success, error, and idle states. ([source](https://riverpod.dev/docs/concepts2/mutations))
- [Asynchronous State Managers](https://awesome-repositories.com/f/web-development/asynchronous-state-managers.md) — Handles loading, error, and data states automatically through AsyncNotifier without manual boolean flags. ([source](https://riverpod.dev/docs/migration/from_change_notifier))
- [Asynchronous Data Handling](https://awesome-repositories.com/f/web-development/data-fetching-caching/asynchronous-data-handling.md) — Handles asynchronous operations with loading, error, and success states including automatic retry and cancellation.
- [Dependency-Based Cache Invalidation](https://awesome-repositories.com/f/web-development/data-fetching-caching/cache-invalidation-utilities/dependency-based-cache-invalidation.md) — Automatically clears cached results when dependencies change, keeping derived data up to date. ([source](https://riverpod.dev/docs/concepts2/providers))
- [Reactive Dependency Invalidators](https://awesome-repositories.com/f/web-development/data-fetching-caching/cache-invalidation-utilities/dependency-based-cache-invalidation/reactive-dependency-invalidators.md) — Automatically clears cached values and triggers recomputation when upstream providers change.
- [Asynchronous Data Caching](https://awesome-repositories.com/f/web-development/data-fetching-caching/data-fetching/asynchronous-data-caching.md) — Caches async operation results and exposes loading, error, and data states to widgets without manual future handling.
- [Async Loading State Handlers](https://awesome-repositories.com/f/web-development/performance-optimizations/lazy-loading-strategies/async-loading-state-handlers.md) — Provides a typed async value that forces pattern matching on loading, data, and error states. ([source](https://riverpod.dev/))
- [Typed Async State Unions](https://awesome-repositories.com/f/web-development/performance-optimizations/lazy-loading-strategies/async-loading-state-handlers/typed-async-state-unions.md) — Provides a typed async state union that forces exhaustive handling of loading, data, and error states.
- [Reactive State Management](https://awesome-repositories.com/f/web-development/reactive-state-management.md) — Watches multiple providers and produces a single combined reactive value without nesting. ([source](https://cdn.jsdelivr.net/gh/rrousselgit/riverpod@master/README.md))
- [Flat Provider Compositions](https://awesome-repositories.com/f/web-development/state-management-providers/flat-provider-compositions.md) — Combines values from multiple providers by calling ref.watch directly, removing the need for ProxyProvider wrappers. ([source](https://riverpod.dev/docs/from_provider/quickstart))
- [Provider Compositions](https://awesome-repositories.com/f/web-development/state-management-providers/provider-compositions.md) — Reads the output of one provider inside another to derive new state without manual wiring. ([source](https://riverpod.dev/docs/introduction/getting_started))
- [Unified Provider Reads](https://awesome-repositories.com/f/web-development/state-update-handlers/transient-state-reads/unified-provider-reads.md) — Ships a single watch call that replaces multiple older reading patterns with one consistent approach. ([source](https://riverpod.dev/docs/migration/0.14.0_to_1.0.0))

### Part of an Awesome List

- [Provider Resource Disposals](https://awesome-repositories.com/f/awesome-lists/devops/memory-management/automated-dependency-disposal/provider-resource-disposals.md) — Disposes provider resources when no listeners remain, preventing memory leaks from unused state. ([source](https://riverpod.dev/docs/concepts2/providers))

### Development Tools & Productivity

- [Provider Syntax Migration Tools](https://awesome-repositories.com/f/development-tools-productivity/code-generation-tools/provider-syntax-migration-tools.md) — Riverpod converts existing provider declarations to the code-generation syntax by replacing manual type selection with annotations. ([source](https://riverpod.dev/docs/concepts/about_code_generation))
- [Provider Implementation Overrides](https://awesome-repositories.com/f/development-tools-productivity/ide-integration-plugins/model-provider-overrides/provider-implementation-overrides.md) — Changes a provider's behavior for testing, debugging, or scoping by supplying an alternative implementation. ([source](https://riverpod.dev/docs/concepts2/overrides))

### DevOps & Infrastructure

- [Automatic Retry Clients](https://awesome-repositories.com/f/devops-infrastructure/api-service-management/api-resilience/request-retries/automatic-retry-clients.md) — Automatically re-executes failed providers with configurable delay and retry count. ([source](https://riverpod.dev/docs/concepts2/retry))
- [Provider Scoping Overrides](https://awesome-repositories.com/f/devops-infrastructure/platform-as-a-service-providers/provider-scoping-overrides.md) — Riverpod changes a provider's behavior for a specific widget subtree by supplying an override in a non-root ProviderContainer or ProviderScope. ([source](https://riverpod.dev/docs/concepts2/scoping))

### Testing & Quality Assurance

- [Test Isolation](https://awesome-repositories.com/f/testing-quality-assurance/general-testing-utilities/test-isolation.md) — Creates a ProviderContainer to read and listen to providers within unit tests, ensuring no shared state between tests. ([source](https://riverpod.dev/docs/how_to/testing))
- [Logic Isolation Utilities](https://awesome-repositories.com/f/testing-quality-assurance/general-testing-utilities/test-isolation/logic-isolation-utilities.md) — Creates isolated provider containers for testing state management logic without a widget tree.
- [Business Logic Isolation](https://awesome-repositories.com/f/testing-quality-assurance/general-testing-utilities/test-isolation/logic-isolation-utilities/business-logic-isolation.md) — Creates a provider's state outside the widget tree so unit tests can verify business logic without a UI framework. ([source](https://cdn.jsdelivr.net/gh/rrousselgit/riverpod@master/README.md))
- [Mock Client Testing](https://awesome-repositories.com/f/testing-quality-assurance/mock-client-testing.md) — Replaces a provider's implementation with a mock during tests or previews to isolate behavior. ([source](https://riverpod.dev/docs/concepts2/providers))
- [Mocking and Spying Libraries](https://awesome-repositories.com/f/testing-quality-assurance/mocking-and-spying-libraries.md) — Listens to a provider's value changes in tests, enabling assertions on state transitions. ([source](https://riverpod.dev/docs/how_to/testing))
