getImageByHash method

Future<ImageData<Object>?> getImageByHash(
  1. String hash, {
  2. bool compressed = false,
})

gets image specified by its hash

Implementation

Future<ImageData?> getImageByHash(String hash,
    {bool compressed = false}) async {
  final requestType = Helper.SimulatedRequestType.GET;
  return _run(
    itPrefersCache:
        false, //! wir nehmen immer lieber lokale bilder, bandbreite und so
    offline: () => local.getImageByHash(hash, compressed: compressed),
    online: () => remote.getImageByHash(hash, compressed: compressed),
    requestType: requestType,
  ).last;
}