downloadFile static method

Future<File?> downloadFile(
  1. String url, {
  2. bool useCache = true,
  3. String? cacheKey,
  4. String? cacheTag,
})

下载图片并缓存

Implementation

static Future<File?> downloadFile(String url,
    {bool useCache = true, String? cacheKey, String? cacheTag}) async {
  await BaseWebImage.getNetworkImageData(url,
      useCache: useCache, cacheKey: cacheKey, cacheTag: cacheTag);
  return await cacheGetFile(url,
      cacheKey: keyToTagMd5(url, cacheKey, cacheTag));
}