remove method

  1. @override
Future<void> remove(
  1. String key
)
override

Removes an object by its key.

This method validates the key, removes the object from the backend storage, and notifies all global listeners and key-specific listeners for this key. If the key doesn't exist, no error is thrown (the operation is idempotent).

Parameters:

  • key - The key of the object to remove. Must be non-empty, not only whitespace, and not contain the delimiter.

Throws:

See also:

Implementation

@override
Future<void> remove(String key) async {
  validateKey(key);
  await backend.remove(encodeKey(key));
  notifyListeners(key);
}