From 204bd4c33bdf9fabbc8097f7bbe4b5c943ce4a21 Mon Sep 17 00:00:00 2001 From: Remi Rousselet Date: Sun, 9 Apr 2023 21:30:10 +0200 Subject: [PATCH] Fix AsyncValue.isReloading docs --- packages/riverpod/CHANGELOG.md | 4 ++++ packages/riverpod/lib/src/common.dart | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/riverpod/CHANGELOG.md b/packages/riverpod/CHANGELOG.md index 9dbf6529f..20b9284f3 100644 --- a/packages/riverpod/CHANGELOG.md +++ b/packages/riverpod/CHANGELOG.md @@ -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) diff --git a/packages/riverpod/lib/src/common.dart b/packages/riverpod/lib/src/common.dart index f4808149f..b792469b7 100644 --- a/packages/riverpod/lib/src/common.dart +++ b/packages/riverpod/lib/src/common.dart @@ -535,7 +535,9 @@ extension AsyncValueX on AsyncValue { /// (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;