getNetworkImageData static method

Future<Uint8List?> getNetworkImageData(
  1. String url, {
  2. bool useCache = true,
  3. String? cacheKey,
  4. String? cacheTag,
  5. StreamController<ImageChunkEvent>? chunkEvents,
})

get network image data from cached

Implementation

static Future<Uint8List?> getNetworkImageData(
  String url, {
  bool useCache = true,
  String? cacheKey,
  String? cacheTag,
  StreamController<ImageChunkEvent>? chunkEvents,
}) async {
  var img = url;
  if (kWebImagePrefix != null && !img.startsWith("http")) {
    img = getJoin(kWebImagePrefix!, img);
  }
  return BaseExtendedNetworkImageProvider(img,
          cache: useCache, cacheKey: keyToTagMd5(img, cacheKey, cacheTag))
      .getNetworkImageData(
    chunkEvents: chunkEvents,
  );
}