Resource<T> class

Constructors

Resource({ResourceStatus status: ResourceStatus.ERROR, T data, String message, int code, dynamic exception, dynamic extras})
Resource.error(T data, String message, {int code, dynamic exception, dynamic extras})
factory
Resource.loading(T data, {dynamic extras})
factory
Resource.success(T data, {dynamic extras})
factory

Properties

code ↔ int
read / write
data ↔ T
read / write
exception ↔ dynamic
read / write
extras ↔ dynamic
read / write
message ↔ String
read / write
status ResourceStatus
@required, read / write
hashCode → int
The hash code for this object.
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

equals(Object o) → bool
exists() → bool
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() → String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) → bool
The equality operator.
inherited

Static Methods

hasData(Resource resource) → bool