Skip to content

Commit

Permalink
Another doc fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rrousselGit committed Aug 27, 2023
1 parent 4130a5d commit 4461140
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/riverpod/lib/src/common.dart
Original file line number Diff line number Diff line change
Expand Up @@ -508,10 +508,10 @@ extension AsyncValueX<T> on AsyncValue<T> {
/// 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;
Expand Down

0 comments on commit 4461140

Please sign in to comment.