Response.fromClient constructor Null safety

Response.fromClient(
  1. HttpClientResponse clientResponse,
  2. dynamic body
)

Maps the client response to Response

Implementation

factory Response.fromClient(HttpClientResponse clientResponse, body) {
  return Response(
      statusCode: clientResponse.statusCode,
      body: body,
      connectionInfo: clientResponse.connectionInfo,
      headers: clientResponse.headers);
}