ResourceLoader<DataType> class

Constructors

ResourceLoader({AdeptPublishSubject<Resource<DataType>> publishSubject, OnLoadFromCache<DataType> onLoadFromCache, OnLoadedFromCache<DataType> onLoadedFromCache, LoadFromStorage loadFromStorage, OnLoadFromStorage<DataType> onLoadFromStorage, OnLoadedFromStorage<DataType> onLoadedFromStorage, OnLoadFromStorageFailed onLoadFromStorageFailed, CreateAPICall<DataType> createAPICall, OnLoadedFromAPI<DataType> onLoadedFromAPI, OnLoadFromAPIFailed onLoadFromAPIFailed, OnFailed onFailed, OnErrorManagement onErrorManagement})

Properties

publishSubjectHasValue → bool
read-only
publishSubjectValueHasData → bool
read-only
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

asFuture() → Future<Resource<DataType>>
asPublishSubject() AdeptPublishSubject<Resource<DataType>>
cancel() → void
createAPICall() → Future<Response<DataType>>
isCancelled() → bool
isRunning() → bool
load() → void
loadFromStorage() → Future<bool>
onFailed(dynamic exception) → Future<Resource>
onLoadedFromAPI({Resource<DataType> resource, Response<DataType> response}) → Future<Resource>
onLoadedFromCache(Resource<DataType> resource) → Future
onLoadedFromStorage(Resource<DataType> resource) → Future
onLoadFromAPIFailed({dynamic exception, int code, Response response}) → Future<Resource>
onLoadFromCache() → Future<DataType>
onLoadFromStorage() → Future<DataType>
onLoadFromStorageFailed(dynamic exception) → Future<Resource>
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