diff --git a/packages/riverpod/lib/src/common.dart b/packages/riverpod/lib/src/common.dart index 85574cb49..70a0a9a08 100644 --- a/packages/riverpod/lib/src/common.dart +++ b/packages/riverpod/lib/src/common.dart @@ -508,10 +508,10 @@ extension AsyncValueX on AsyncValue { /// This is different from [value], which will rethrow the error instead of returning null. /// /// If you do not want to return previous value during loading/error states, - /// consider using [asData] : + /// consider using [unwrapPrevious] : /// /// ```dart - /// ref.watch(provider).asData()?.valueOrNull; + /// ref.watch(provider).unwrapPrevious()?.valueOrNull; /// ``` T? get valueOrNull { if (hasValue) return value;