copyWith method

Response copyWith({
  1. Map<String, Object?>? headers,
  2. Object? body,
})

Creates a new Response by copying existing values and applying specified changes.

Implementation

Response copyWith({Map<String, Object?>? headers, Object? body}) {
  return Response._(_response.change(headers: headers, body: body));
}