copyWith method

InfospectBreakpointPayload copyWith({
  1. String? method,
  2. String? uri,
  3. String? endpoint,
  4. Map<String, String>? headers,
  5. Map<String, String>? queryParameters,
  6. String? body,
  7. int? statusCode,
  8. bool clearStatusCode = false,
})

Implementation

InfospectBreakpointPayload copyWith({
  String? method,
  String? uri,
  String? endpoint,
  Map<String, String>? headers,
  Map<String, String>? queryParameters,
  String? body,
  int? statusCode,
  bool clearStatusCode = false,
}) {
  return InfospectBreakpointPayload(
    method: method ?? this.method,
    uri: uri ?? this.uri,
    endpoint: endpoint ?? this.endpoint,
    headers: headers ?? this.headers,
    queryParameters: queryParameters ?? this.queryParameters,
    body: body ?? this.body,
    statusCode: clearStatusCode ? null : (statusCode ?? this.statusCode),
  );
}