cancel method

void cancel (
  1. [dynamic reason]
)

Cancel the request

Implementation

void cancel([dynamic reason]) {
  _cancelError = DioError(type: DioErrorType.CANCEL, error: reason);
  _completer.complete();
}