remove method

Future<void> remove(
  1. String key
)

Implementation

Future<void> remove(String key) async {
  try {
    final raw = _box.get(key);
    if (raw != null) {
      final entry = CacheEntry.fromJson(Map<String, dynamic>.from(raw));
      await FileUtils.deleteFile(entry.localPath);
      await _box.delete(key);
    }
  } catch (e) {
    CloudLogger.error('Cache remove failed key=$key', error: e);
  }
}