Skip to content

Commit

Permalink
Fix AsyncValue.isReloading docs
Browse files Browse the repository at this point in the history
  • Loading branch information
rrousselGit committed Apr 9, 2023
1 parent 20b6a18 commit 204bd4c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/riverpod/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## Unreleased fix

- fix `AsyncValue.isReloading` docs

## 2.3.4 - 2023-04-07

- Fixes an issue with nested ProviderScope (thanks to @jeiea)
Expand Down
4 changes: 3 additions & 1 deletion packages/riverpod/lib/src/common.dart
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,9 @@ extension AsyncValueX<T> on AsyncValue<T> {
/// (using [Ref.watch]), after at least one [value]/[error] was emitted.
///
/// If a provider rebuilds because one of its dependencies changed (using [Ref.watch]),
/// then [isReloading] will be false.
/// then [isReloading] will be true.
/// If a provider rebuilds only due to [Ref.invalidate]/[Ref.refresh], then
/// [isReloading] will be false (and [isRefreshing] will be true).
///
/// See also [isRefreshing] for manual provider rebuild.
bool get isReloading => (hasValue || hasError) && this is AsyncLoading;
Expand Down

0 comments on commit 204bd4c

Please sign in to comment.