copyWith method
Create a copy with updated values
Implementation
NetworkLogEntry copyWith({
int? statusCode,
Map<String, dynamic>? responseHeaders,
dynamic responseBody,
Duration? duration,
String? error,
bool? isCompleted,
}) {
return NetworkLogEntry(
id: id,
timestamp: timestamp,
method: method,
url: url,
requestHeaders: requestHeaders,
requestBody: requestBody,
statusCode: statusCode ?? this.statusCode,
responseHeaders: responseHeaders ?? this.responseHeaders,
responseBody: responseBody ?? this.responseBody,
duration: duration ?? this.duration,
error: error ?? this.error,
isCompleted: isCompleted ?? this.isCompleted,
);
}