Response.created constructor Null safety

Response.created(
  1. String location,
  2. {dynamic body,
  3. Map<String, dynamic>? headers}
)

Represents a 201 response.

The location is a URI that is added as the Location header.

Implementation

Response.created(
  String location, {
  dynamic body,
  Map<String, dynamic>? headers,
}) : this(
        HttpStatus.created,
        _headersWith(headers, {HttpHeaders.locationHeader: location}),
        body,
      );