We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 23d936a commit 2130b34Copy full SHA for 2130b34
1 file changed
flutter_cache_manager/lib/src/cache_store.dart
@@ -1,6 +1,7 @@
1
import 'dart:async';
2
import 'dart:io';
3
4
+import 'package:flutter/foundation.dart';
5
import 'package:flutter_cache_manager/flutter_cache_manager.dart';
6
7
import 'storage/file_system/file_system.dart';
@@ -187,7 +188,7 @@ class CacheStore {
187
188
}
189
final file = await fileSystem.createFile(cacheObject.relativePath);
190
- if (file.existsSync()) {
191
+ if (kIsWeb ? await file.exists() : file.existsSync()) {
192
try {
193
await file.delete();
194
// ignore: unused_catch_clause
0 commit comments