clearCacheFile static method

Future<void> clearCacheFile()

Implementation

static Future<void> clearCacheFile() async {
  try {
    final file = await _getCacheFile();
    if (await file.exists()) {
      await file.delete();
      if (kDebugMode) {
        print("Cache file deleted successfully.");
      }
    } else {
      if (kDebugMode) {
        print("Cache file does not exist.");
      }
    }
  } catch (e) {
    if (kDebugMode) {
      print("Error deleting cache file: $e");
    }
  }
}