copyWith method
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,
);
}