refa: cache manager (#2266)

* opt: image utils

* refa: cache manager
This commit is contained in:
My-Responsitories
2026-06-02 14:09:36 +00:00
committed by GitHub
parent e619946b9c
commit 66a191b018
26 changed files with 126 additions and 196 deletions

View File

@@ -20,8 +20,8 @@ import 'package:PiliPlus/utils/extension/file_ext.dart';
import 'package:PiliPlus/utils/extension/string_ext.dart';
import 'package:PiliPlus/utils/id_utils.dart';
import 'package:PiliPlus/utils/path_utils.dart';
import 'package:cached_network_image_ce/cached_network_image.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter_cache_manager/flutter_cache_manager.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:get/get.dart';
import 'package:path/path.dart' as path;
@@ -350,7 +350,7 @@ class DownloadService extends GetxService {
if (File(filePath).existsSync()) {
return true;
}
final file = (await DefaultCacheManager().getFileFromCache(
final file = (await DefaultCacheManager.instance!.getFileFromCache(
entry.cover,
))?.file;
if (file != null) {