delete<T extends ParseObject> method

Future<ParseResponse> delete<T extends ParseObject>(
  1. {String id,
  2. String path}
)

Deletes the current object locally and online

Implementation

Future<ParseResponse> delete<T extends ParseObject>(
    {String id, String path}) async {
  try {
    path ??= _path;
    id ??= objectId;
    final Uri url = getSanitisedUri(_client, '$_path/$id');
    final ParseNetworkResponse result = await _client.delete(url.toString());
    return handleResponse<T>(
        this, result, ParseApiRQ.delete, _debug, parseClassName);
  } on Exception catch (e) {
    return handleException(e, ParseApiRQ.delete, _debug, parseClassName);
  }
}