getOrDownload method

  1. @override
FutureOr<S> getOrDownload()
override

Returns entity from cache or tries to download from API if not found. If downloading is successful it caches results

Implementation

@override
FutureOr<S> getOrDownload() async => this.getFromCache() ?? await this.download();