isCached static method

bool isCached({
  1. required String imageUrl,
})

isCached returns a boolean indicating whether the given image is cached or not. Returns true if cached, false if not.

Implementation

static bool isCached({required String imageUrl}) {
  _checkInit();

  final key = _keyFromUrl(imageUrl);
  if (_imageKeyBox!.containsKey(key) && _imageBox!.keys.contains(key)) {
    return true;
  }
  return false;
}