delete method
Deletes the file at this FileStorageReference.
Implementation
Future<int> delete() async {
assert(id > 0);
final String url = "$fileEndpointUri/$id";
final response = await service._delete(url);
int httpStatusCode = response.statusCode;
switch (httpStatusCode) {
case HttpStatus.ok:
case HttpStatus.noContent:
return httpStatusCode;
default:
Map<String, dynamic> responseJson =
json.decode(response.body) as Map<String, dynamic>;
throw CarpServiceException.fromMap(httpStatusCode, responseJson);
}
}