delete method
Removes an entry from the store.
Deletes the entry stored under key
from the server.
If eTagReceiver
was specified, it will contain the current eTag of the
deleted entry after the returned future was resolved. This should always
be ApiConstants.nullETag, but is available here for consistency. To only
delete from the store if data was not changed, pass the eTag
of the last
known value.
Implementation
Future<void> delete(
String key, {
String? eTag,
ETagReceiver? eTagReceiver,
}) async {
final response = await restApi.delete(
path: _buildPath(key),
printMode: eTag == null ? PrintMode.silent : null,
ifMatch: eTag,
eTag: eTagReceiver != null,
);
_applyETag(eTagReceiver, response);
}