getCachedImage method

Future<Uint8List?> getCachedImage(
  1. String url, {
  2. String? cacheKey,
})

Implementation

Future<Uint8List?> getCachedImage(String url, {String? cacheKey}) async {
  try {
    final id = _id(url, cacheKey);
    final info = await _getFromCache(id);
    if (info != null) {
      _setCache(id, info);
      return _bytes(info);
    }
    return null;
  } catch (e) {
    return null;
  }
}