copyWith method

HttpResponse copyWith({
  1. int? statusCode,
  2. String? statusMessage,
  3. Map<String, dynamic>? headers,
  4. Object? body,
  5. DateTime? time,
  6. Map<String, dynamic>? additionalData,
})

Implementation

HttpResponse copyWith({
  int? statusCode,
  String? statusMessage,
  Map<String, dynamic>? headers,
  Object? body,
  DateTime? time,
  Map<String, dynamic>? additionalData,
}) {
  return HttpResponse(
    statusCode: statusCode ?? this.statusCode,
    statusMessage: statusMessage ?? this.statusMessage,
    headers: headers ?? this.headers,
    body: body ?? this.body,
    time: time ?? this.time,
    additionalData: additionalData ?? this.additionalData,
  );
}