copyWith method

NetworkData copyWith({
  1. String? url,
  2. String? method,
  3. String? requestBody,
  4. String? responseBody,
  5. int? requestBodySize,
  6. int? responseBodySize,
  7. int? status,
  8. Map<String, dynamic>? requestHeaders,
  9. Map<String, dynamic>? responseHeaders,
  10. int? duration,
  11. String? requestContentType,
  12. String? responseContentType,
  13. DateTime? endTime,
  14. DateTime? startTime,
  15. int? errorCode,
  16. String? errorDomain,
})

Implementation

NetworkData copyWith({
  String? url,
  String? method,
  String? requestBody,
  String? responseBody,
  int? requestBodySize,
  int? responseBodySize,
  int? status,
  Map<String, dynamic>? requestHeaders,
  Map<String, dynamic>? responseHeaders,
  int? duration,
  String? requestContentType,
  String? responseContentType,
  DateTime? endTime,
  DateTime? startTime,
  int? errorCode,
  String? errorDomain,
}) =>
    NetworkData(
      url: url ?? this.url,
      method: method ?? this.method,
      requestBody: requestBody ?? this.requestBody,
      responseBody: responseBody ?? this.responseBody,
      requestBodySize: requestBodySize ?? this.requestBodySize,
      responseBodySize: responseBodySize ?? this.responseBodySize,
      status: status ?? this.status,
      requestHeaders: requestHeaders ?? this.requestHeaders,
      responseHeaders: responseHeaders ?? this.responseHeaders,
      duration: duration ?? this.duration,
      requestContentType: requestContentType ?? this.requestContentType,
      responseContentType: responseContentType ?? this.responseContentType,
      endTime: endTime ?? this.endTime,
      startTime: startTime ?? this.startTime,
      errorCode: errorCode ?? this.errorCode,
      errorDomain: errorDomain ?? this.errorDomain,
    );