downloadAndCacheImage method
Implementation
Future<Uint8List?> downloadAndCacheImage(
String url, {
Map<String, String>? headers,
String? cacheKey,
}) async {
try {
final id = _id(url, cacheKey);
final info = await _cacheManager.downloadFile(url, key: id, authHeaders: headers);
_touch(id);
_setCache(id, info);
return _bytes(info);
} catch (e) {
return null;
}
}