copyWith method
Create a copy with updated values.
Implementation
DebugNetworkRequest copyWith({
String? id,
String? url,
HttpMethod? method,
Map<String, dynamic>? headers,
dynamic body,
DateTime? requestTime,
int? statusCode,
Map<String, dynamic>? responseHeaders,
dynamic responseBody,
DateTime? responseTime,
int? durationMs,
String? errorMessage,
bool? isLoading,
}) {
return DebugNetworkRequest(
id: id ?? this.id,
url: url ?? this.url,
method: method ?? this.method,
headers: headers ?? this.headers,
body: body ?? this.body,
requestTime: requestTime ?? this.requestTime,
statusCode: statusCode ?? this.statusCode,
responseHeaders: responseHeaders ?? this.responseHeaders,
responseBody: responseBody ?? this.responseBody,
responseTime: responseTime ?? this.responseTime,
durationMs: durationMs ?? this.durationMs,
errorMessage: errorMessage ?? this.errorMessage,
isLoading: isLoading ?? this.isLoading,
);
}