destroy method
Deletes everything in the store.
Recursively deletes all values that exists in this store. After this operation, the store will be empty.
If eTagReceiver
was specified, it will contain the current eTag of the
deleted store after the returned future was resolved. This should always
be ApiConstants.nullETag, but is available here for consistency. To only
destroy the store if data was not changed, pass the eTag
of the last
known store state. You can obtain this eTag via keys or all.
Implementation
Future<void> destroy({
String? eTag,
ETagReceiver? eTagReceiver,
}) async {
final response = await restApi.delete(
path: _buildPath(),
printMode: eTag == null ? PrintMode.silent : null,
ifMatch: eTag,
eTag: eTagReceiver != null,
);
_applyETag(eTagReceiver, response);
}