cachePutFile static method
手动缓存文件
Implementation
static Future<File?> cachePutFile(
{required String url, required File file, String? cacheTag}) async {
final String key = keyToTagMd5(url, null, cacheTag) ?? url.md5;
final Directory cacheImagesDirectory = Directory(
getJoin((await getAppTemporaryDirectory()).path, cacheImageFolderName));
if (cacheImagesDirectory.existsSync()) {
return file.copy(getJoin(cacheImagesDirectory.path, key));
}
return null;
}