copyWith method

SentryRequest copyWith({
  1. String? url,
  2. String? method,
  3. String? queryString,
  4. String? cookies,
  5. String? fragment,
  6. dynamic data,
  7. Map<String, String>? headers,
  8. Map<String, String>? env,
  9. bool removeCookies = false,
  10. String? apiTarget,
  11. @Deprecated('Will be removed in v8. Use [data] instead') Map<String, String>? other,
})

Implementation

SentryRequest copyWith({
  String? url,
  String? method,
  String? queryString,
  String? cookies,
  String? fragment,
  dynamic data,
  Map<String, String>? headers,
  Map<String, String>? env,
  bool removeCookies = false,
  String? apiTarget,
  @Deprecated('Will be removed in v8. Use [data] instead')
  Map<String, String>? other,
}) =>
    SentryRequest(
      url: url ?? this.url,
      method: method ?? this.method,
      queryString: queryString ?? this.queryString,
      cookies: removeCookies ? null : cookies ?? this.cookies,
      data: data ?? _data,
      headers: headers ?? _headers,
      env: env ?? _env,
      fragment: fragment ?? this.fragment,
      apiTarget: apiTarget ?? this.apiTarget,
      // ignore: deprecated_member_use_from_same_package
      other: other ?? _other,
      unknown: unknown,
    );