setCache method

void setCache(
  1. ImageReference img,
  2. Uint8List bytes
)

Implementation

void setCache(ImageReference img, Uint8List bytes) {
  if (!hasCache(img)) {
    img.bytes = bytes;
    cache.add(img);
  } else {
    cache.firstWhere((e) => e == img).bytes = bytes;
  }
}