hooks_riverpod 0.6.0-dev+1
hooks_riverpod: ^0.6.0-dev+1 copied to clipboard
A simple way to access state from anywhere in your application while robust and testable.
0.6.0-dev+1 #
0.5.1 #
- Fixed the documentation of
StateNotifierProviderincorrectly showing the documentation ofStreamProvider. - Improve the documentation of
StateProvider.
0.5.0 #
- Changed
ComputedFamilyintoComputed.family - Added [AsyncValue.guard](https://pub.flutter-io.cn/documentation/riverpod/latest/riverpod/AsyncValue/guard.html to simplify transforming a Future into an AsyncValue.
- Improved the documentation of the different providers
0.4.0 #
Changed the syntax of "AutoDispose*" and "*Family" to use a syntax similar to named constructors instead.
Before:
final myProvider = AutoDisposeStateNotifierProviderFamily<MyStateNotifier, int>((ref, id) {
return MyStateNotifier(id: id);
});
After:
final myProvider = StateNotifierProvider.autoDispose.family<MyStateNotifier, int>((ref, id) {
return MyStateNotifier(id: id);
});
The behavior is the same. Only the syntax changed.
0.3.1 #
- Loosen the version constraint of
flutter_hooksused to support latest versions.
0.3.0 #
-
Added
AsyncValue.whenData, syntax sugar forAsyncValue.whento handle only thedatacase and do nothing for the error/loading cases. -
Fixed a bug that caused [Computed] to crash if it stopped being listened then was listened again.
0.2.1 #
-
useProviderno longer throws anUnsupportedErrorwhen the provider listened changes, and correctly listen to the new provider. -
ComputedandConsumernow correctly unsubscribe to a provider when their function stops using a provider.
0.2.0 #
ref.readis renamed asref.dependOn- Deprecated
ref.dependOn(streamProvider).streamandref.dependOn(futureProvider).futurein favor of a universalref.dependOn(provider).value. - added
ref.read(provider), syntax sugar forref.dependOn(provider).value.
0.1.0 #
Initial release