Response.notModified constructor Null safety

Response.notModified(
  1. DateTime lastModified,
  2. CachePolicy? cachePolicy
)

Represents a 304 response.

Where lastModified is the last modified date of the resource and cachePolicy is the same policy as applied when this resource was first fetched.

Implementation

Response.notModified(DateTime lastModified, this.cachePolicy) {
  statusCode = HttpStatus.notModified;
  headers = {HttpHeaders.lastModifiedHeader: HttpDate.format(lastModified)};
}