ResourceError<T> class

Creates an ResourceState in error state.

The parameter error cannot be null.

Implemented types
Available Extensions
Annotations
  • @immutable

Constructors

ResourceError(Object error, {StackTrace? stackTrace, bool isRefreshing = false})
Creates an ResourceState in error state.
const

Properties

error Object
The error.
final
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
stackTrace StackTrace?
The stackTrace of error, optional.
final

Methods

copyWith({Object? error, StackTrace? stackTrace, bool? isRefreshing}) ResourceError<T>
Convenience method to update the isRefreshing value of a Resource
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