copyWith method

DioException copyWith({
  1. RequestOptions? requestOptions,
  2. Response? response,
  3. DioExceptionType? type,
  4. Object? error,
  5. StackTrace? stackTrace,
  6. String? message,
})
inherited

Generate a new DioException by combining given values and original values.

Implementation

DioException copyWith({
  RequestOptions? requestOptions,
  Response? response,
  DioExceptionType? type,
  Object? error,
  StackTrace? stackTrace,
  String? message,
}) {
  return DioException(
    requestOptions: requestOptions ?? this.requestOptions,
    response: response ?? this.response,
    type: type ?? this.type,
    error: error ?? this.error,
    stackTrace: stackTrace ?? this.stackTrace,
    message: message ?? this.message,
  );
}