cancel method

dynamic cancel()

Implementation

cancel() {
  if (!_completer.isCompleted) {
    _completer.complete(Response(status: -1, isCancelled: true));
    _cancelled = true;
    onCancel?.call();
  }
}