loadNew method
AdeptPublishSubject<Resource<ResourceData?> >
loadNew({
- List<
Param> ? params, - AdeptPublishSubject<
Resource< ? publishSubject,ResourceData?> >
override
Implementation
@override
AdeptPublishSubject<Resource<ResourceData?>> loadNew(
{List<Param>? params,
AdeptPublishSubject<Resource<ResourceData?>>? publishSubject}) {
publishSubject ??= this.publishSubject;
return ResourceLoader<ResourceData?>(
publishSubject: publishSubject,
loadFromCache: () async {
try {
return dao.load() as ResourceData?;
} catch (e) {
//If there is an exception here means Data can't cast to ResourceData then this method should be Overridden
print(e);
}
return null;
}).asPublishSubject();
}