cancel method
void
cancel([
- dynamic reason
Cancel the request
Implementation
void cancel([dynamic reason]) {
_cancelError = DioError(
type: DioErrorType.cancel,
error: reason,
requestOptions: requestOptions ?? RequestOptions(path: ''),
);
_cancelError!.stackTrace = StackTrace.current;
if (!_completer.isCompleted) {
_completer.complete(_cancelError);
}
}