AsyncData<ValueT>  class 
    final
 
    Core
Creates an AsyncValue with a data.
- Inheritance
- 
    - Object
- AsyncValue<ValueT> 
- AsyncResult<ValueT> 
- AsyncData
 
- Available extensions
- Annotations
- 
    - @publicInRiverpodAndCodegen
 
Constructors
- AsyncData(ValueT value, {@internal DataKind? kind})
- 
          Creates an AsyncValue with a data.
            const
Properties
- 
  asData
  → AsyncData<ValueT> ?
- 
      Available on AsyncValue< Upcast AsyncValue into an AsyncData, or return null if the AsyncValue is an AsyncLoading/AsyncError.ValueT> , provided by the AsyncValueExtensions extensionno setter
- 
  asError
  → AsyncError<ValueT> ?
- 
      Available on AsyncValue< Upcast AsyncValue into an AsyncError, or return null if the AsyncValue is an AsyncLoading/AsyncData.ValueT> , provided by the AsyncValueExtensions extensionno setter
- error → Object?
- 
  The error.
  no setterinherited
- hasError → bool
- 
      Available on AsyncValue< Whether error is not null.ValueT> , provided by the AsyncValueExtensions extensionno setter
- hashCode → int
- 
  The hash code for this object.
  no setterinherited
- hasValue → bool
- 
      Available on AsyncValue< Whether value is set.ValueT> , provided by the AsyncValueExtensions extensionno setter
- isFromCache → bool
- 
      Available on AsyncValue< Whether the value was obtained using Riverpod's offline-persistence feature.ValueT> , provided by the AsyncValueExtensions extensionno setter
- isLoading → bool
- 
      Available on AsyncValue< Whether some new value is currently asynchronously loading.ValueT> , provided by the AsyncValueExtensions extensionno setter
- isRefreshing → bool
- 
      Available on AsyncValue< Whether the associated provider was forced to recompute even though none of its dependencies has changed, after at least one value/error was emitted.ValueT> , provided by the AsyncValueExtensions extensionno setter
- isReloading → bool
- 
      Available on AsyncValue< Whether the associated provider was recomputed because of a dependency change (using Ref.watch), after at least one value/error was emitted.ValueT> , provided by the AsyncValueExtensions extensionno setter
- progress → num?
- 
      Available on AsyncValue< The current progress of the asynchronous operation.ValueT> , provided by the AsyncValueExtensions extensionno setter
- requireValue → ValueT
- 
  If hasValue is true, returns the value.
Otherwise if hasError, rethrows the error.
Finally if in loading state, throws a StateError.
  no setterinherited
- retrying → bool
- 
      Available on AsyncValue< If an error was emitted, whether that error is currently being retried.ValueT> , provided by the AsyncValueExtensions extensionno setter
- runtimeType → Type
- 
  A representation of the runtime type of the object.
  no setterinherited
- stackTrace → StackTrace?
- 
  The stacktrace of error.
  no setterinherited
- value → ValueT
- 
  The value currently exposed.
  no setteroverride
Methods
- 
  map<NewT> ({required NewT data(AsyncData< ValueT> data), required NewT error(AsyncError<ValueT> error), required NewT loading(AsyncLoading<ValueT> loading)}) → NewT
- 
      Available on AsyncValue< Perform some action based on the current state of the AsyncValue.ValueT> , provided by the AsyncValueExtensions extension
- 
  mapOrNull<NewT> ({NewT? data(AsyncData< ValueT> data)?, NewT? error(AsyncError<ValueT> error)?, NewT? loading(AsyncLoading<ValueT> loading)?}) → NewT?
- 
      Available on AsyncValue< Perform some actions based on the state of the AsyncValue, or return null if the current state wasn't tested.ValueT> , provided by the AsyncValueExtensions extension
- 
  maybeMap<NewT> ({NewT data(AsyncData< ValueT> data)?, NewT error(AsyncError<ValueT> error)?, NewT loading(AsyncLoading<ValueT> loading)?, required NewT orElse()}) → NewT
- 
      Available on AsyncValue< Perform some actions based on the state of the AsyncValue, or call orElse if the current state was not tested.ValueT> , provided by the AsyncValueExtensions extension
- 
  maybeWhen<NewT> ({bool skipLoadingOnReload = false, bool skipLoadingOnRefresh = true, bool skipError = false, NewT data(ValueT data)?, NewT error(Object error, StackTrace stackTrace)?, NewT loading()?, required NewT orElse()}) → NewT 
- 
      Available on AsyncValue< Switch-case over the state of the AsyncValue while purposefully not handling some cases.ValueT> , provided by the AsyncValueExtensions extension
- 
  noSuchMethod(Invocation invocation) → dynamic 
- 
  Invoked when a nonexistent method or property is accessed.
  inherited
- 
  toString() → String 
- 
  A string representation of this object.
  inherited
- 
  unwrapPrevious() → AsyncValue< ValueT> 
- 
      Available on AsyncValue< The opposite ofValueT> , provided by the AsyncValueExtensions extensioncopyWithPrevious, reverting to the raw AsyncValue with no information on the previous state.
- 
  when<NewT> ({bool skipLoadingOnReload = false, bool skipLoadingOnRefresh = true, bool skipError = false, required NewT data(ValueT data), required NewT error(Object error, StackTrace stackTrace), required NewT loading()}) → NewT 
- 
      Available on AsyncValue< Performs an action based on the state of the AsyncValue.ValueT> , provided by the AsyncValueExtensions extension
- 
  whenData<NewT> (NewT cb(ValueT value)) → AsyncValue< NewT> 
- 
      Available on AsyncValue< Shorthand for when to handle only theValueT> , provided by the AsyncValueExtensions extensiondatacase.
- 
  whenOrNull<NewT> ({bool skipLoadingOnReload = false, bool skipLoadingOnRefresh = true, bool skipError = false, NewT? data(ValueT data)?, NewT? error(Object error, StackTrace stackTrace)?, NewT? loading()?}) → NewT? 
- 
      Available on AsyncValue< Perform actions conditionally based on the state of the AsyncValue.ValueT> , provided by the AsyncValueExtensions extension
Operators
- 
  operator ==(Object other) → bool 
- 
  The equality operator.
  inherited