copyWith method

ResponseEntity copyWith({
  1. int? statusCode,
  2. Object? body,
  3. Map<String, Object>? headers,
  4. Encoding? encoding,
  5. Map<String, Object>? context,
})

Implementation

ResponseEntity copyWith({
  int? statusCode,
  Object? body,
  Map<String, /* String | List<String> */ Object>? headers,
  Encoding? encoding,
  Map<String, Object>? context,
}) {
  return ResponseEntity(
    statusCode ?? this.statusCode,
    body: body ?? _body,
    headers: headers ?? this.headers,
    encoding: encoding ?? this.encoding,
    context: context ?? this.context,
  );
}