abort method

  1. @override
void abort([
  1. Object? error
])
inherited

Cancel this request. If the request has already finished, this will do nothing.

Implementation

@override
void abort([Object? error]) {
  if (isCanceled) return;
  isCanceled = true;

  abortRequest();
  _cancellationError = error;
  _cancellationCompleter.complete();
  if (!_done.isCompleted) {
    _done.complete();
  }
}