sizeBytes property

int get sizeBytes

The estimated size, in bytes, of all the loaded images in the cache.

Every image is estimated as four bytes per pixel, which is what the decoded image occupies in memory. Images that are still loading do not count.

Implementation

int get sizeBytes {
  var total = 0;
  for (final asset in _assets.values) {
    total += asset.sizeBytes;
  }
  return total;
}