deleteTask method
Deletes a task.
A task can be deleted if it is scheduled or dispatched. A task cannot be deleted if it has executed successfully or permanently failed.
Throws a http.ClientException if there were problems communicating with
the API service. Throws a ServiceException if the API method failed for
any reason.
Implementation
@override
Future<void> deleteTask(DeleteTaskRequest request) async {
if (isClosed) throw StateError('Service is closed');
if (_deleteTask case final deleteTask?) {
return deleteTask(request);
}
throw UnsupportedError('deleteTask');
}