ResponseWithLastModified constructor

ResponseWithLastModified(
  1. dynamic body, {
  2. Map<String, dynamic>? additionalHeaders,
  3. required Request request,
  4. required DateTime? lastModified,
  5. int? statusCode,
  6. ContentType? contentType,
})

Implementation

ResponseWithLastModified(dynamic body,
    {Map<String, dynamic>? additionalHeaders,
    required Request request,
    required DateTime? lastModified,
    int? statusCode,
    ContentType? contentType})
    : super._(
          body is Body
              ? body
              : body != null
                  ? Body(body)
                  : null,
          validationData: lastModified,
          request: request,
          contentType: contentType,
          statusCode: statusCode ?? 200,
          additionalHeaders: (additionalHeaders ?? <String, dynamic>{})
            ..addAll({
              if (lastModified != null)
                HttpHeaders.lastModifiedHeader: HttpDate.format(lastModified)
            }));