riverpod_annotation
A package exposing annotations for riverpod_generator
4.0.6
1.1M downloads/mo
#344 most downloaded on pub.dev
rrousselGit/riverpod
What this package is like to depend on
Last release 26 days ago
28 Jul 2026
Ships fairly regularly
a new release about every 5 weeks
Nearly every release is documented
notes for 43 of 43 stable releases
1 version withdrawn
withdrawn after publishing
4 years old
57 releases · first in 2022
13 releases in the last 12 months
see the full history below
Release timeline
57 releases · Sep 2022 to Jul 2026Releases
latest 57-
4.0.628 Jul 2026Release notes
Open source →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 -
4.0.526 Jul 2026 -
4.0.310 Jun 2026Release notes
Open source →- Fix
AsyncNotifierProvider/StreamNotifierProviderdisposing dependencies watched after an asynchronous gap during rebuild. (thanks to @a1573595)
Dependency changes
riverpodupgraded to3.3.2
- Fix
-
4.0.3-dev.206 May 2026 pre-release -
4.0.3-dev.103 May 2026 pre-release -
4.0.203 Feb 2026 -
4.0.117 Jan 2026 -
4.0.028 Dec 2025 -
3.0.309 Oct 2025 -
3.0.207 Oct 2025 -
3.0.130 Sep 2025 -
3.0.010 Sep 2025Release notes
Open source →Finally, a stable release for Riverpod 3.0!
For the full changelog, check out https://riverpod.dev/docs/whats_new
-
3.0.0-dev.1809 Sep 2025 pre-release -
3.0.0-dev.1701 Aug 2025 pre-releaseRelease notes
Open source →- Fixed a conflict between public and private providers of the same name
- Allow passing
persist(key: ...) - Bump minimum
metaversion - Support
@Riverpod(name: ...) - Add
provider_name_strip_patternbuild option - Bump minimum
metaversion - Support
@Riverpod(name: ...) - Added
MutationState.isPending/isIdle/hasError/isSuccess - fixes various "pause" issues
- Bump minimum
metaversion - Added
AsyncValue.retrying, to check when a retry is scheduled or pending - Exposed the default retry implementation (
ProviderContainer.defaultRetry) - Offline's Storage now is
baseand requires overridingdeleteOutOfDate - Make AsyncValue.copyWithPrevious
@internal. This API was not meant to be public.
-
3.0.0-dev.1620 Jun 2025 pre-release -
3.0.0-dev.1504 May 2025 pre-release -
3.0.0-dev.1402 May 2025 pre-release -
3.0.0-dev.1301 May 2025 pre-release -
3.0.0-dev.1230 Apr 2025 pre-releaseRelease notes
Open source →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:
- Offline and mutation support, as experimental features
- Automatic retry support
- Pause/resume support
- Simplification of various aspects of the API (such as fusing
AutoDisposeNotifier/Notifier) - Added a
Ref.mountedto simplify dealing with provider disposal - Improved testing with the new
ProviderContainer.test()and the ability to mock a Notifier'sbuildmethod without mocking the whole object usingprovider.overrideWithBuild(...)
Note about experimental features:
Anything imported withpackage:riverpod/experimental/....dartare not stable features. They may be modified in breaking ways without a major version. Use with care!Full change list
- Breaking various
package:riverpodobjects are no-longer exported. If you wish to use providers by hand, you will have to separately importpackage:riverpod/riverpod.dart. - Breaking:
ChangeNotifierProvider,StateProviderandStateNotifierProviderare moved out ofpackage:hooks_riverpod/hooks_riverpod.darttopackage:hooks_riverpod/legacy.dart. - Breaking: All providers now use
==to compare previous/new values and filter updates. If you want to revert to the old behavior, you can overrideupdateShouldNotifyinside Notifiers. - Breaking: ProviderListenable.addListener is deleted and now internal-only. A simpler alternative will be added in the future.
- Breaking: ProviderObserver methods have been updated to take a
ProviderObserverContextparameter. This replaces the oldprovider+containerparameters, and contains extra information. - Breaking: Removed all
Refsubclasses (suchFutureProviderRef). UseRefdirectly instead. ForFutureProviderRef.future, migrate to using anAsyncNotifier. - Breaking All ref and notifier methods besides "mounted" now throw if used after getting disposed.
- Breaking:
StateProviderandStateNotifierProviderare moved out ofpackage:flutter_riverpod/flutter_riverpod.darttopackage:flutter_riverpod/legacy.dart. - Breaking Some internal utils are no-longer exported.
- Breaking
AsyncValue.valuenow returnsnullduring errors. - Breaking removed
AsyncValue.valueOrNull(use.valueinstead). Stream/FutureProvider.overrideWithValuewas added back.- Breaking:
Notifierand variants are now recreated whenever the provider rebuilds. This enables usingRef.mountedto check dispose. - Breaking:
StreamProvidernow pauses itsStreamSubscriptionwhen the provider is not actively listened. - Breaking: Calling ref.watch multiple times calls ref.onListen every-times.
- Breaking: A provider is now considered "paused" if all
of its listeners are also paused. So if a provider
Ais watched only by a providerB, andBis currently unused, thenAwill be paused. - Breaking: When an asynchronous provider rebuilds, it doesn't immediately stops
listening to its previous providers. Instead, those subscriptions are removed when the rebuild completes.
This impacts how "auto-dispose" behaves. See https://github.com/rrousselGit/riverpod/issues/1253 - Added
@mutationsupport. Mutations are a way to enable your UI to easily listen to the status of side-effects. See the documentation of@mutationfor further information. - Made
@Riverpodfinal - Added
@Dependencies([...]), for lint purposes. This is similar to@Riverpod(dependencies: [...]), but is applied on non-provider objects that may use a scoped provider. - Added support for
@Riverpod(retry: ...) - Failing providers are now automatically retried after a delay. The delay can be optionally configured.
- Allow using Ref synchronously after a provider has been invalidated. This avoids mounted exceptions when doing multiple operations in a quick succession.
- Instead of
Provider.autoDispose()andProvider.autoDispose.family(), it is now possible to writeProvider(isAutoDispose: true)andProvider.family(isAutoDispose: true). - Fix
StreamProvidernot cancelling theStreamSubscriptionif the stream is never emitted any value. - All
Reflife-cycles (such asRef.onDispose) andNotifier.listenSelfnow return a function to remove the listener. - Added methods to
ProviderObserverfor listening to "mutations". Mutations are a new code-generation-only feature. See riverpod_generator's changelog for more information. - Added
Ref.listen(..., weak: true). When specifyingweak: 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. AsyncValuenow has an optionalprogressfield. This can be set by providers to allow the UI to show a custom progress logic.- An error is now thrown when trying to override a provider twice in the same
ProviderContainer. - Disposing a
ProviderContainernow disposes of all of its subProviderContainerstoo. - Added
ProviderSubscription.pause()/.resume(). This enables temporarily stopping the subscription to a provider, without it possibly loosing its state when usingautoDispose. - Added
ProviderContainer.test(). This is a custom constructor for testing purpose. It is meant to replace thecreateContainerutility. - Added
NotifierProvider.overrideWithBuild, to overrideNotifier.buildwithout overriding methods of the notifier. Ref.mountedhas been added. It can now be used to check if a provider was disposed.- When a provider is rebuilt, a new
Refis now created. This avoids issues where an old build of a provider is still performing work. - Updated
AsyncValuedocumentations to use pattern matching. - Added support for
Ref/ProviderContainer.invalidate(provider, asReload: true) - Failing providers are now automatically retried after a delay. The delay can be optionally configured.
- Fixed a bug when overriding a specific provider of a
family, combined withdependencies: [family]
-
3.0.0-dev.327 Nov 2023 pre-release -
3.0.0-dev.220 Nov 2023 pre-release -
3.0.0-dev.120 Nov 2023 pre-release -
3.0.0-dev.029 Oct 2023 pre-release -
2.6.122 Oct 2024 -
2.6.020 Oct 2024 -
2.5.312 Oct 2024 -
2.3.510 Mar 2024 -
2.3.403 Feb 2024 -
2.3.326 Nov 2023 -
2.3.220 Nov 2023 -
2.3.113 Nov 2023 -
2.3.028 Oct 2023 -
2.2.115 Oct 2023 -
2.2.005 Oct 2023 -
2.1.627 Sep 2023 -
2.1.504 Sep 2023 -
2.1.428 Aug 2023 -
2.1.328 Aug 2023 -
2.1.216 Aug 2023 -
2.1.124 Apr 2023 -
2.1.018 Apr 2023Release notes
Open source →- Added support for
Rawtypedef in the return value of providers. This can be used to disable the conversion of Futures/Streams into AsyncValues@riverpod Raw<Future<int>> myProvider(...) async => ...; ... // returns a Future<int> instead of AsyncValue<int> Future<int> value = ref.watch(myProvider);
- Added support for
-
2.0.407 Apr 2023 -
2.0.306 Apr 2023 -
2.0.213 Mar 2023 -
2.0.109 Mar 2023 -
2.0.028 Feb 2023Release notes
Open source →- Export necessary utilities for providers returning a Stream.
- Upgraded riverpod dependency
-
1.2.112 Feb 2023 -
1.2.012 Feb 2023 withdrawnRelease notes
Open source →- It is now possible to specify
@Riverpod(dependencies: [...])to scope providers - Marked
@Riverpodas@sealed
- It is now possible to specify
-
1.1.125 Dec 2022 -
1.1.025 Dec 2022 -
1.0.601 Nov 2022 -
1.0.531 Oct 2022 -
1.0.408 Oct 2022 -
1.0.308 Oct 2022 -
1.0.203 Oct 2022 -
1.0.102 Oct 2022 -
1.0.030 Sep 2022