ResourceReady<T> class

Creates an ResourceState in ready state with a data.

Implemented types
Available Extensions
Annotations
  • @immutable

Constructors

ResourceReady(T value, {bool isRefreshing = false})
Creates an ResourceState with a data.
const

Properties

hashCode int
The hash code for this object.
no setteroverride
isRefreshing bool
Indicates if the data is being refreshed, defaults to false.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value → T
The value currently exposed.
final

Methods

copyWith({T? value, bool? isRefreshing}) ResourceReady<T>
Convenience method to update the values of a ResourceReady.
map<R>({required R ready(ResourceReady<T> ready), required R error(ResourceError<T> error), required R loading(ResourceLoading<T> loading)}) → R
private mapper, so that classes inheriting Resource can specify their own map method with different parameters.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override