riverpod_annotation 3.0.3
riverpod_annotation: ^3.0.3 copied to clipboard
A package exposing annotations for riverpod_generator
3.0.3 - 2025-10-09 #
riverpodupgraded to3.0.3
3.0.2 - 2025-10-07 #
riverpodupgraded to3.0.2
3.0.1 - 2025-09-30 #
- Now supports Dart 3.7.0
3.0.0 - 2025-09-10 #
Finally, a stable release for Riverpod 3.0!
For the full changelog, check out https://riverpod.dev/docs/whats_new
3.0.0-dev.18 - 2025-09-09 #
riverpodupgraded to3.0.0-dev.18
3.0.0-dev.17 - 2025-08-01 #
- 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.16 - 2025-06-20 #
Reworked annotations. The old annotation logic has been removed.
3.0.0-dev.15 - 2025-05-02 #
Update dependency
3.0.0-dev.14 - 2025-05-02 #
Removed dead code
3.0.0-dev.13 - 2025-05-01 #
riverpodupgraded to3.0.0-dev.13
3.0.0-dev.12 - 2025-04-30 #
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 with package:riverpod/experimental/....dart are 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.3 - 2023-11-27 #
riverpodupgraded to3.0.0-dev.3
3.0.0-dev.2 - 2023-11-20 #
riverpodupgraded to3.0.0-dev.2
3.0.0-dev.1 - 2023-11-20 #
riverpodupgraded to3.0.0-dev.1
3.0.0-dev.0 - 2023-10-29 #
riverpodupgraded to3.0.0-dev.0
2.6.1 - 2024-10-22 #
riverpodupgraded to2.6.1
2.6.0 - 2024-10-20 #
riverpodupgraded to2.6.0
2.5.3 - 2024-10-12 #
riverpodupgraded to2.5.3
2.3.5 - 2024-03-10 #
riverpodupgraded to2.5.1
2.3.4 - 2024-02-03 #
- Improved
@Riverpod(dependencies: [...])documentation.
2.3.3 - 2023-11-27 #
riverpodupgraded to2.4.9
2.3.2 - 2023-11-20 #
riverpodupgraded to2.4.8
2.3.0 - 2023-10-28 #
- Exported internal
FamilyOverrideAPI, for use in generated code.
2.2.1 - 2023-10-15 #
riverpodupgraded to2.4.4
2.2.0 - 2023-10-06 #
- Exports
@internalfrompkg:metafor the code-generator to use.
2.1.6 - 2023-09-27 #
riverpodupgraded to2.4.1
2.1.5 - 2023-09-04 #
riverpodupgraded to2.4.0
2.1.4 - 2023-08-28 #
riverpodupgraded to2.3.10
2.1.3 - 2023-08-28 #
riverpodupgraded to2.3.8
2.1.2 - 2023-08-16 #
riverpodupgraded to2.3.7
2.1.1 - 2023-04-24 #
riverpodupgraded to2.3.6
2.1.0 - 2023-04-18 #
- 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);
2.0.4 - 2023-04-07 #
riverpodupgraded to2.3.4
2.0.3 - 2023-04-06 #
riverpodupgraded to2.3.3
2.0.2 - 2023-03-13 #
riverpodupgraded to2.3.2
2.0.1 - 2023-03-09 #
riverpodupgraded to2.3.1
2.0.0 #
- Export necessary utilities for providers returning a Stream.
- Upgraded riverpod dependency
1.2.1 #
Bump minimum Riverpod version
1.2.0 #
- It is now possible to specify
@Riverpod(dependencies: [...])to scope providers - Marked
@Riverpodas@sealed
1.1.1 #
Upgrade Riverpod to latest
1.1.0 #
Upgrade Riverpod to latest
1.0.6 #
Upgrade Riverpod to latest
1.0.5 #
Upgrade Riverpod to latest
1.0.4 #
Export more missing types
1.0.3 #
Export missing types
1.0.2 #
- Update a dependency to the latest release.
1.0.1 #
Upgrade Riverpod version
1.0.0 #
Initial release