NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
pub.dev · #212 most downloaded on pub.dev
A reactive caching and data-binding framework. Riverpod makes working with asynchronous code a breeze.
Last release 1 months ago
03 Sep 2026
Ships fairly regularly
a new release about every 5 weeks
Nearly every release is documented
notes for 56 of the last 60 stable releases
1 version withdrawn
withdrawn after publishing
6 years old
116 releases · first in 2020
One column per quarter.
riverpod_analyzer_utils : 1.0.0-dev.11 -> 1.0.0-dev.12 riverpod : 3.4.2 -> 3.4.3 riverpod_annotation : 4.0.6 -> 4.0.7 riverpod_sqflite : 0.4.6 -> 0.4.
riverpod_analyzer_utils : 1.0.0-dev.11 -> 1.0.0-dev.12
riverpod : 3.4.2 -> 3.4.3
riverpod_annotation : 4.0.6 -> 4.0.7
riverpod_sqflite : 0.4.6 -> 0.4.7
riverpod_generator : 4.0.8 -> 4.0.9
flutter_riverpod : 3.4.2 -> 3.4.3
riverpod_lint : 3.1.8 -> 3.1.9
hooks_riverpod : 3.4.2 -> 3.4.3
riverpod_annotation : 4.0.5 -> 4.0.6 riverpod_sqflite : 0.4.5 -> 0.4.6 riverpod_generator : 4.0.7 -> 4.0.8 flutter_riverpod : 3.4.1 -> 3.4.2 riverpod_
riverpod_annotation : 4.0.5 -> 4.0.6
riverpod_sqflite : 0.4.5 -> 0.4.6
riverpod_generator : 4.0.7 -> 4.0.8
flutter_riverpod : 3.4.1 -> 3.4.2
riverpod_lint : 3.1.7 -> 3.1.8
hooks_riverpod : 3.4.1 -> 3.4.2
- Update devtool extension
Deprecated SyncProviderTransformerMixin. It is replaced by the newly added APIs
SyncProviderTransformerMixin. It is replaced by the newly added APIsanalyzer to <15.0.0CustomProviderListenable, a slightly simplified way of making custom provider extensionsValueListenable<int> listenable = ref.watch(counterProvider.listenable).
This uses the new pkg:listen.invalidate/refresh not finding providers and families when called
from a scoped ProviderContainer/ProviderScope with overrides, if the
provider was never read through that scope. (thanks to @itsUndefined)invalidate/refresh not finding providers and families when called
from a scoped ProviderScope with overrides, if the provider was never
read through that scope. (thanks to @itsUndefined)ConsumerState.dispose threw.Fixes assertion error when providers are unpaused.
AsyncNotifierProvider/StreamNotifierProvider disposing dependencies
watched after an asynchronous gap during rebuild. (thanks to @a1573595)TapGestureRecognizer leak in the state inspector, where the
recognizer was recreated on every rebuild and never disposed. (thanks to @Gyeony95)Mutation.run throwing a StateError ("subscription was closed") when
the ProviderContainer was disposed while the mutation was still running. (thanks to @Gyeony95)Mutation.reset not cancelling an in-flight run. The pending run could
previously write its result back over the reset state once it completed. (thanks to @Gyeony95)Fixed Riverpod devtool not starting.
Devtool-only: Added debugTrackProviderCreation, which can be set to true to enable the Riverpod devtool to jump to the source of a provider.
Devtool-only:
Added debugTrackProviderCreation, which can be set to true to enable the Riverpod devtool
to jump to the source of a provider.
Added Ref.onManualInvalidation() lifecycle method to listen for manual provider invalidations.
This allows distinguishing between manual invalidations (via refresh/invalidate/invalidateSelf)
and automatic invalidations caused by dependency changes. Additionally, providers can now forward
invalidations to other providers within onManualInvalidation callbacks, enabling patterns like:
final sourceProvider = Provider<String>(...);
final derivedProvider = Provider((ref) {
final thing = ref.watch(sourceProvider);
ref.onManualInvalidation(() {
ref.invalidate(sourceProvider);
});
return '$thing is derived!';
});
ref.invalidate(derivedProvider); // also invalidates sourceProvider!
Which allows for users to invalidate only the providers they care about, while implementation details can be handled privately. (thanks to @TekExplorer)
Added ProviderContainer.allProviders(), to obtain all providers accessible from said container. You can optionally specify allProviders(family: myFamily) to only include providers from said family.
Refactored internal scheduling mechanism to solve some markNeedsBuild error.
Removed @internal for ProviderFamily.new
Added various life-cycles to ProviderObserver
Fix .future incorrectly notifying listeners even when AsyncValue doesn't change.
Fixed a bug where resuming a paused provider could cause it to never notify its listener ever again.
Deprecated family.overrideWith in favour of family.overrideWith2 The behaviour is the same, but the callback now takes the argument as a parameter. In…
weak flags to WidgetRef.listen/listenManualRef.isPaused to check if there are any active/non-paused listeners.family.overrideWith in favour of family.overrideWith2
The behaviour is the same, but the callback now takes the argument as a parameter.
In 4.0.0, overrideWith2 will be renamed to overrideWith.ref.mounted returning true for stale refs after provider rebuild, causing race conditions in async providers.ref.listen(..., weak: true)) would incorrectly initialize during hot reload (thanks to @tguerin)selectAsync sometimes throwing an exception when unsubscribed to.Added an alternative way to combine asynchronous providers. This can be done by using AsyncValue.requireValue inside FutureProvider/AsyncNotifier like
Added an alternative way to combine asynchronous providers.
This can be done by using AsyncValue.requireValue inside FutureProvider/AsyncNotifier
like so:
final sumProvider = FutureProvider((ref) { // Not async
AsyncValue<int> a = ref.watch(aProvider);
AsyncValue<int> b = ref.watch(bProvider);
// The following is safe if used inside the init function of providers.
return a.requireValue + b.requireValue;
})
This enables synchronously combining asynchronous providers.
Fixed a bug with scoping when specifying dependencies: [...]
Added Override.origin. This enables knowing which provider is associated with an override.
Fix a regression with AsyncLoading.isRefreshing/isReloading
Fixed a false positive incorrectly causing Providers are not allowed to modify other providers during their initialization.
Providers are not allowed to modify other providers during their initialization.Improve the error message when a circular dependency error is thrown
- Now supports Dart 3.7.0 - Support async 2.12.0
async 2.12.0Finally, a stable release for Riverpod 3.0!
Finally, a stable release for Riverpod 3.0!
For the full changelog, check out https://riverpod.dev/docs/whats_new
A provider that is currently being retried is now flagged as "loading" while the retry attempts complete. Meaning that ref.watch(provider.future) skip
ref.watch(provider.future) skips the intermediate error states.ProviderObserver is now marked with baseFamilyNotifier and variants, in favour of Notifier.provider.future will now skip offline-persisted state by default.
This avoids awkward unexpected provider rebuild when chaining persisted providers.Mutation.call generic.
This allows for better compatibility with generic-returning functions (thanks to @TekExplorer)Added MutationState.isPending/isIdle/hasError/isSuccess
MutationState.isPending/isIdle/hasError/isSuccessmeta versionAsyncValue.retrying, to check when a retry is scheduled or pendingProviderContainer.defaultRetry)base and requires overriding deleteOutOfDate@internal.
This API was not meant to be public.Added Async/SyncProviderTransformerMixin. Those enable making custom ProviderListenables using a reasonably simple syntax. For instance, you could imp
Async/SyncProviderTransformerMixin.
Those enable making custom ProviderListenables using a reasonably simple syntax.
For instance, you could implement your own provider.selectAsyncResult. This is an interface shared between AsyncData and AsyncError, but not AsyncLoading.ProviderContainer's Zone instead of whatever last used the provider.ref.watch/ref.read rethrows an error,
the error is now wrapped in a ProviderException.ProviderContainer in the widget tree: tester.container() (thanks to @Luckey-Elijah)- Docs update - Fix an AsyncValue bug
Some docs/internal changes
Some docs/internal changes
Attempt to fix a runtime error in Javascript builds
Say hello to Riverpod 3.0.0! This major version is a transition version, to unblock the development of the project. It is quite possible that a 4.0.0
Say hello to Riverpod 3.0.0! This major version is a transition version, to unblock the development of the project. It is quite possible that a 4.0.0 will be released relatively soon in the future, so keep that in mind when migrating.
Here are some highlights about this version:
AutoDisposeNotifier/Notifier)Ref.mounted to simplify dealing with provider disposalProviderContainer.test() and the ability to
mock a Notifier's build method without mocking the whole object using provider.overrideWithBuild(...)Note about experimental features:
Anything imported with package:riverpod/experimental/....dart are not stable features.
They may be modified in breaking ways without a major version. Use with care!
ChangeNotifierProvider, StateProvider and StateNotifierProvider
are moved out of package:hooks_riverpod/hooks_riverpod.dart to
package:hooks_riverpod/legacy.dart.== to compare previous/new values and filter
updates.
If you want to revert to the old behavior, you can override updateShouldNotify inside
Notifiers.Provider.autoDispose() and Provider.autoDispose.family(), it is now possible to write Provider(isAutoDispose: true) and Provider.family(isAutoDispose: true).ProviderObserverContext parameter.
This replaces the old provider+container parameters, and contains extra
information.Ref subclasses (such FutureProviderRef).
Use Ref directly instead.
For FutureProviderRef.future, migrate to using an AsyncNotifier.StateProvider and StateNotifierProvider
are moved out of package:flutter_riverpod/flutter_riverpod.dart to
package:flutter_riverpod/legacy.dart.AsyncValue.value now returns null during errors.AsyncValue.valueOrNull (use .value instead).Stream/FutureProvider.overrideWithValue was added back.Notifier and variants are now recreated whenever the provider
rebuilds. This enables using Ref.mounted to check dispose.StreamProvider now pauses its StreamSubscription when
the provider is not actively listened.A is watched only by a provider B, and B is currently unused,
then A will be paused.StreamProvider not cancelling the StreamSubscription if the stream is never emitted any value.Ref life-cycles (such as Ref.onDispose) and Notifier.listenSelf
now return a function to remove the listener.ProviderObserver for listening to "mutations".
Mutations are a new code-generation-only feature. See riverpod_generator's changelog
for more information.Ref.listen(..., weak: true).
When specifying weak: true, the listener will not cause the provider to be
initialized. This is useful when wanting to react to changes to a provider,
but not trigger a network request if not necessary.AsyncValue now has an optional progress field.
This can be set by providers to allow the UI to show a custom progress logic.ProviderContainer.ProviderContainer now disposes of all of its sub ProviderContainers too.ProviderSubscription.pause()/.resume().
This enables temporarily stopping the subscription to a provider, without it possibly loosing its state when using autoDispose.ProviderContainer.test(). This is a custom constructor for testing
purpose. It is meant to replace the createContainer utility.NotifierProvider.overrideWithBuild, to override Notifier.build without
overriding methods of the notifier.Ref.mounted has been added. It can now be used to check if a provider
was disposed.Ref is now created. This avoids
issues where an old build of a provider is still performing work.AsyncValue documentations to use pattern matching.Ref/ProviderContainer.invalidate(provider, asReload: true)family, combined with dependencies: [family]Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Added AsyncNotifier.listenSelf. It was mistakenly absent from the 2.6.0 release
AsyncNotifier.listenSelf. It was mistakenly absent from the 2.6.0 releaseDeprecated all Ref subclasses. Instead, use Ref itself.
Ref subclasses. Instead, use Ref itself.Ref's type argument. Use Ref without its generic parameter instead.Ref member that used Ref's generic (such as Ref.state or Ref.listenSelf).
Instead, use a Notifier.Notifier.listenSelf, as a replacement to Ref.listenSelf.Ref.watch and other methods now accept auto-dispose providers too.Fixed a typo in the documentation (thanks to @ljbkusters)
Improved Provider(dependencies: [...]) documentation.
Provider(dependencies: [...]) documentation.pub.dev descriptionref.invalidate now correctly clear all resources associated
with the provider if the provider is no-longer used.selectAsync sometimes never resolving.ProviderSubscription.read returned by ref.listen(provider.future) not throwing if used after the subscription has been closed.ref.onAddListener and other life-cycles not being triggered when
listening to provider.future/provider.notifier.Assertion failed: _lastFuture == nullAdd test argument to AsyncValue.guard method. (thanks to @utamori)
test argument to AsyncValue.guard method. (thanks to @utamori)Fix "pending timer" issue inside tests when using ref.keepAlive().
ref.keepAlive().Ref.invalidate/Ref.refresh not throwing on circular dependency.ref.keepAlive if the KeepAliveLink is
immediately closed.container.exists(provider) on nested containers not checking their
parent containers.Fix exceptions when using multiple root ProviderContainers/ProviderScopes.
Fix exceptions when using multiple root ProviderContainers/ProviderScopes.
Fix ProviderObserver.didUpdateProvider being called with an incorrect "provider" parameter when the provider is overridden.
ProviderObserver.didUpdateProvider being called with an incorrect
"provider" parameter when the provider is overridden.Exceptions in asynchronous providers are now correctly received by ProviderObserver.providerDidFail.
ProviderObserver.providerDidFail.ProviderScope is rebuilt with a different key.Nothing published for this version
Update the documentation of provider.argument to match the behavior of generated providers.
provider.argument to match the behavior of
generated providers.Fixed incorrect @visibleForTesting warning.
@visibleForTesting warning.Fix invalid Dart docs (thanks to @srawlins)
Added Notifier.stateOrNull. This will return null if used when the notifier has yet to be initialized or is in error state.
Notifier.stateOrNull. This will return null if used when the
notifier has yet to be initialized or is in error state.Riverpod now requires package:meta >=1.9.0
Riverpod now requires package:meta >=1.9.0
Nothing published for this version
Added support for state_notifier 1.0.0
Notifier.state is now accessible inside testsImproved error message for missing dependencies (thanks to @ValentinVignal)
dependencies (thanks to @ValentinVignal)fix AsyncValue.isReloading docs
AsyncValue.isReloading docsFixes an issue with nested ProviderScope (thanks to @jeiea)
The debugger no-longer pauses on uncaught exceptions inside providers. This was voluntary, but too many people have complained that it often is a fals
Deprecated the generic parameter of Family. This will enable implementing generic providers in riverpod_generator once it is removed.
Family. This will enable implementing
generic providers in riverpod_generator once it is removed.Updated AsyncValue.value/valueOrNull docs to cover the "previous value" cases (thanks to @AhmedLSayed9)
AsyncValue.value/valueOrNull docs to cover the "previous value"
cases (thanks to @AhmedLSayed9)Deprecated StreamProvider.stream Instead of:
Added StreamNotifier + StreamNotifierProvider. This is for building a
StreamProvider while exposing ways to modify the stream.
It is primarily meant to be used using code-generation via riverpod_generator, by writing:
@riverpod
class Example extends _$Example {
@override
Stream<Model> build() {
// TODO return some stream
}
}
Deprecated StreamProvider.stream Instead of:
ref.watch(provider.stream).listen(...)
do:
ref.listen(provider, (_, value) {...});
Instead of:
final a = StreamProvider((ref) {
return ref.watch(b.stream).map((e) => Model(e));
})
Do:
final a = FutureProvider((ref) async {
final e = await ref.watch(b.future);
return Model(e);
})
Some restrictions on the dependencies parameter of providers have been
lifted. It is no-longer necessary to include providers which do not themselves
specify dependencies. All providers should specify dependencies if they
are scoped at any point.
Annotated Notifier.state setter as protected.
Improve type-inference when using AsyncValue.whenOrNull (thanks to @AhmedLSayed9)
AsyncValue.whenOrNull (thanks to
@AhmedLSayed9)Fixes an issue with FutureProvider
Fixes an issue with FutureProvider<void> (#2028)
fixes an exception on newer Dart versions
FutureProvider/AsyncNotifier did not emit the new
state when the created Future completed (#1997)Fix typos
Fix typos
Deprecated StateProvider.state Instead, use either ref.watch(stateProvider) or ref.read(stateProvider.notifier).state =
A small release adding missing utilities and fixing some web related issues.
Added provider.overrideWith((ref) => state)
Added FutureProviderRef.future.
Deprecated StateProvider.state Instead, use either
ref.watch(stateProvider) or ref.read(stateProvider.notifier).state =
Deprecated provider.overrideWithProvider. Instead use
provider.overrideWith
Added Ref.notifyListeners() to forcibly notify dependents. This can be
useful for mutable state.
Added @useResult to Ref.refresh/WidgetRef.refresh
Added Ref.exists to check whether a provider is initialized or not.
FutureProvider, StreamProvider and AsyncNotifierProvider now preserve
the previous data/error when going back to loading. This is done by allowing
AsyncLoading to optionally contain a value/error.
Added
AsyncValue.when(skipLoadingOnReload: bool, skipLoadingOnRefresh: bool, skipError: bool)
flags to give fine control over whether the UI should show loading or
data/error cases.
Add AsyncValue.requireValue, to forcibly obtain the value and throw if in
loading/error state
Doing ref.watch(futureProvider.future) can no-longer return a
SynchronousFuture. That behavior could break various Future utilities,
such as Future.wait
Add AsyncValue.copyWithPrevious(..., isRefresh: false) to differentiate
rebuilds from ref.watch vs rebuilds from ref.refresh.
ProviderContainer no-longer throws when disposed if it has an undisposed child ProviderContainer.
Fixes a stackoverflow on Web caused by Dart (thanks to @leehack)
Fixes a bug when the root ProviderContainer is not associated with a ProviderScope.
Fixes a case where a circular dependency between providers was incorrectly allowed (#1766)
FIX: Fixed an assert error if a family depends on itself while specifying dependencies. (#1721).
family depends on itself while
specifying dependencies. (#1721).Updated changelog (see 2.0.0)
Updated changelog (see 2.0.0)
Removed the deprecated ProviderReference.
Here is the changelog for all the changes in the 2.0 version. An article is in progress and will be linked here once available.
Breaking changes:
FutureProvider.stream is removed.overrideWithProvider, it is no-longer possible to override a provider
with a different type of provider (such as overriding FutureProvider with a
StreamProvider).AsyncError.stackTrace is now a required positional parameter and
non-nullableoverrideWithValue methods are removed, besides
Provider.overrideWithValue. This change is temporary, and these methods will
be reintroduced in a later version. In the meantime, you can use
overrideWithProvider.provider.future, provider.state, ...) no-longer are providers,
and therefore no-longer appear inside ProviderObserver.Reader typedef is removed. Use Ref instead.ProviderListener is removed. Used ref.listen instead.ProviderReference.ProviderException if an exception was thrown
while building their value. Instead, they will rethrow the thrown exception
and its stacktrace.provider.future/.notifier/... to the
parameter dependencies of provider. Passing the provider directly is enough.Family type now has a single generic parameter instead of 3.Non-breaking changes:
provider.selectAsync, which allows to both await an async value while
also filtering rebuilds.ref.listenSelf, for subscribing to changes of a provider within that
provider. That can be useful for logging purposes or storing the state of a
provider in a DB.container.invalidate(provider)/ref.invalidate(provider) and
ref.invalidateSelf(). These are similar to ref.refresh methods, but do not
immediately rebuild the provider.These methods are safer than ref.refresh as they can avoid a provider
rebuilding twice in a quick succession.
Added ref.onAddListener, ref.onRemoveListener, ref.onCancel and
ref.onResume. All of which allow performing side-effects when providers are
listened or stop being listened.
A new AutoDisposeRef.keepAlive() function is added. It is meant to replace
AutoDisposeRef.maintainState to make logic for preventing the disposal of a
provider more reusable.
feat; AutoDisposeRef.maintainState is deprecated. Use the new
AutoDisposeRef.keepAlive() instead.
Add support for ref.invalidate(family) to recompute an entire family (#1517)
Added AsyncValue.valueOrNull to obtain the value while ignoring potential
errors.
Added new functionalities to AsyncValue: hasError, hasData, asError,
isLoading , copyWithPrevious and unwrapPrevious.
Fixes:
AsyncValue.whenData did not preserve
AsyncValue.isLoading/isRefreshingStateProvider and StateNotifierProvider no longer notify their listeners
on ref.refresh if the new result is identical to the old one.autoDisposeautoDispose in the process.StateProvider.autoDispose's .stateProviderObserver.didDisposeProvider not executing on provider refresh.AsyncValue.value did not throw if there is an error.onDispose listeners could be executed twice under certain
conditions when using autoDispose.provider.future/provider.stream did work
properlyref.watch assertsFix Timer leak when using cacheTime/disposeDelay and disposing a ProviderContainer
Fix Timer leak when using cacheTime/disposeDelay and disposing a
ProviderContainer
fix: a bug where unmounting a nested ProviderScope could cause an exception
fix: a bug where unmounting a nested ProviderScope could cause an exception (#1400)
Upgrade minimum required Dart SDK version to 2.17.0
Upgrade minimum required Dart SDK version to 2.17.0
Your coding agent can read these notes before it upgrades. Set up the MCP server →