Release 2.1.0 (#1852)

This commit is contained in:
Remi Rousselet
2022-10-31 20:06:58 +01:00
committed by GitHub
parent 31f52b878e
commit 2e5c71b139
16 changed files with 93 additions and 22 deletions

View File

@ -14,7 +14,7 @@ dependencies:
flutter_hooks: ^0.18.0
flutter_svg: ^1.1.4
freezed_annotation: ^2.1.0
hooks_riverpod: ^2.0.2
hooks_riverpod: ^2.1.0
html: ^0.15.0
json_annotation: ^4.6.0
pubspec_parse: ^1.2.1

View File

@ -10,7 +10,7 @@ dependencies:
flutter:
sdk: flutter
cupertino_icons: ^1.0.2
flutter_riverpod: ^2.0.2
flutter_riverpod: ^2.1.0
mockito: ^5.0.13
build_runner: ^2.0.6

View File

@ -13,7 +13,7 @@ dependencies:
sdk: flutter
flutter_hooks: ^0.18.0
freezed_annotation: ^2.1.0
hooks_riverpod: ^2.0.2
hooks_riverpod: ^2.1.0
html: ^0.15.0
json_annotation: ^4.6.0
riverpod_annotation:

View File

@ -1,8 +1,36 @@
## [Unreleased patch]
## 2.1.0
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(..., isRefres: 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.
- Improved the error message when trying to modify a provider inside a
widget life-cycle.
- 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)
## 2.0.2
- **FIX**: Fixed an assert error if a `family` depends on itself while specifying `dependencies`. (#1721).

View File

@ -2,7 +2,7 @@ name: flutter_riverpod
description: >
A simple way to access state from anywhere in your application
while robust and testable.
version: 2.0.2
version: 2.1.0
homepage: https://riverpod.dev
repository: https://github.com/rrousselGit/riverpod
@ -15,7 +15,7 @@ dependencies:
flutter:
sdk: flutter
meta: ^1.4.0
riverpod: 2.0.2
riverpod: 2.1.0
state_notifier: ^0.7.0
dev_dependencies:

View File

@ -1,3 +1,36 @@
## 2.1.0
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(..., isRefres: 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.
- Improved the error message when trying to modify a provider inside a
widget life-cycle.
- 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)
## 2.0.2
- **FIX**: Fixed an assert error if a `family` depends on itself while specifying `dependencies`. (#1721).

View File

@ -2,7 +2,7 @@ name: hooks_riverpod
description: >
A simple way to access state from anywhere in your application
while robust and testable.
version: 2.0.2
version: 2.1.0
homepage: https://riverpod.dev
repository: https://github.com/rrousselGit/riverpod
@ -15,8 +15,8 @@ dependencies:
flutter:
sdk: flutter
flutter_hooks: ^0.18.0
flutter_riverpod: 2.0.2
riverpod: 2.0.2
flutter_riverpod: 2.1.0
riverpod: 2.1.0
state_notifier: ^0.7.0
dev_dependencies:

View File

@ -1,4 +1,6 @@
## [Unreleased minor]
## 2.1.0
A small release adding missing utilities and fixing some web related issues.
- Added `provider.overrideWith((ref) => state`)
- Added `FutureProviderRef.future`.

View File

@ -2,7 +2,7 @@ name: riverpod
description: >
A simple way to access state from anywhere in your application while robust
and testable.
version: 2.0.2
version: 2.1.0
homepage: https://riverpod.dev
repository: https://github.com/rrousselGit/riverpod

View File

@ -1,3 +1,7 @@
## 1.0.5
Upgrade Riverpod to latest
## 1.0.4
Export more missing types

View File

@ -7,7 +7,7 @@ environment:
dependencies:
meta: ^1.7.0
riverpod: 2.0.2
riverpod: 2.1.0
dev_dependencies:
test: ^1.21.0

View File

@ -1,3 +1,7 @@
## 1.0.5
- Upgrade Riverpod and annotation package to latest
## 1.0.4
- Update dependencies.

View File

@ -1,6 +1,6 @@
name: riverpod_generator
description: A code generator for Riverpod. This both simplifies the syntax empowers it, such as allowing stateful hot-reload.
version: 1.0.4
version: 1.0.5
environment:
sdk: ">=2.17.0 <3.0.0"
@ -12,11 +12,11 @@ dependencies:
collection: ^1.15.0
crypto: ^3.0.2
meta: ^1.7.0
riverpod_annotation: ^1.0.4
riverpod_annotation: ^1.0.5
source_gen: ^1.2.0
dev_dependencies:
build_runner: ^2.1.7
build_verify: ^3.0.0
riverpod: ^2.0.2
riverpod: ^2.1.0
test: ^1.21.0

View File

@ -15,7 +15,7 @@ dependencies:
custom_lint_builder: ^0.0.8
meta: ^1.7.0
path: ^1.8.1
riverpod: ^2.0.2
riverpod: ^2.1.0
source_span: ^1.8.0
yaml: ^3.1.1

View File

@ -8,7 +8,7 @@ environment:
dependencies:
riverpod_annotation: ^1.0.3
hooks_riverpod: ^2.0.2
hooks_riverpod: ^2.1.0
flutter:
sdk: flutter

View File

@ -50,7 +50,7 @@ dependencies:
flutter:
sdk: flutter
flutter_hooks: ^0.18.0
hooks_riverpod: ^2.0.2
hooks_riverpod: ^2.1.0
```
Then run `flutter pub get`.
@ -66,7 +66,7 @@ environment:
dependencies:
flutter:
sdk: flutter
flutter_riverpod: ^2.0.2
flutter_riverpod: ^2.1.0
```
Then run `flutter pub get`.
@ -79,7 +79,7 @@ environment:
sdk: ">=2.12.0-0 <3.0.0"
dependencies:
riverpod: ^2.0.2
riverpod: ^2.1.0
```
Then run `dart pub get`.