deleteAll method

  1. @override
Future<void> deleteAll(
  1. List<String> keys
)
override

Deletes multiple values associated with the given keys.

Throws a CacheException if there is an error deleting the data.

Implementation

@override
Future<void> deleteAll(List<String> keys) async {
  if (!_isInitialized) await init();

  // Hive doesn't have a native deleteAll method, so we need to delete each key individually
  for (final key in keys) {
    await _box.delete(key);
  }
}