delete method
Deletes the collection referred to by this CollectionReference.
Implementation
Future<void> delete() async {
final response =
await httpr.delete(Uri.encodeFull(collectionUriByID), headers: headers);
int httpStatusCode = response.statusCode;
if (httpStatusCode == HttpStatus.ok) {
_id = -1;
return;
} else {
final Map<String, dynamic> responseJson =
json.decode(response.body) as Map<String, dynamic>;
throw CarpServiceException(
httpStatus: HTTPStatus(httpStatusCode, response.reasonPhrase),
message: responseJson['message'].toString(),
path: responseJson["path"].toString(),
);
}
}