finds.dev← search

// the find

rrousselGit/riverpod

★ 7,299 · Dart · MIT · updated Jun 2026

A reactive caching and data-binding framework. Riverpod makes working with asynchronous code a breeze.

Riverpod is a state management and async data-fetching library for Flutter/Dart, built as a ground-up rewrite of the Provider package. It replaces InheritedWidget-based dependency injection with a compile-time-safe, globally-scoped container that handles loading and error states automatically. If you're building non-trivial Flutter apps, this is the most mature option in the ecosystem.

The code-generation path via @riverpod annotation removes a whole class of boilerplate — you write a function, the generator produces the provider, and the type system catches misuse at compile time. AsyncValue as a sealed type means you handle loading/error/data via exhaustive pattern matching rather than checking three separate booleans. Provider overrides in tests are first-class: you can substitute any provider in a ProviderContainer without touching production code, making unit tests genuinely isolated. The auto-dispose behavior is automatic for generated providers, so you don't leak subscriptions when widgets leave the tree.

The learning curve is steep because there are too many ways to do the same thing: functional providers, notifier providers, hooks_riverpod, the legacy API, and now experimental mutations and persist — a new team member will pick the wrong one. The code generation dependency (build_runner) means any change to a provider requires running a generator, and in large projects that build step gets slow. The experimental/mutation.dart and experimental/persist.dart APIs are marked experimental with no clear stability timeline, which is a real problem if you build on them. Debugging reactive dependency graphs is still painful — the DevTools extension helps but doesn't make it obvious why a provider rebuilt when you have three levels of transitive watchers.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →