Resource<T> class

Resource data class.

Constructors

Resource.error(String message, {dynamic error, T? data})
factory
Resource.loading([T? data])
factory
Resource.success([T? data])
factory

Properties

data → T?
final
error → dynamic
final
hasData bool
no setter
hashCode int
The hash code for this object.
no setteroverride
isError bool
no setter
isLoading bool
no setter
isNotError bool
no setter
isNotLoading bool
no setter
isSuccess bool
no setter
message String?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
state ResourceState
final

Methods

map<NewType>(NewType? transform(T?)) Resource<NewType>
Transform resource data.
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