cancel method

void cancel([
  1. String message = 'Request cancelled'
])

Cancels/aborts all pending requests on this controller. This will cause all requests to throw a CancelledException.

Optionally, a message may be specified to provide a reason for the cancellation that will be included in the exception. If no message is specified, the default message is "Request cancelled".

Implementation

void cancel([final String message = 'Request cancelled']) {
  for (final activeRequest in _activeRequests) {
    activeRequest.cancel(message);
  }
}