ValidationResponse<T> constructor

ValidationResponse<T>({
  1. required ValidationRequest<T> request,
  2. required T? value,
  3. required ValidationResult result,
  4. Map<String, dynamic>? additionalHeaders,
  5. int? statusCode,
  6. ContentType? contentType,
})

Implementation

ValidationResponse(
    {required ValidationRequest<T> request,
    required this.value,
    required ValidationResult result,
    Map<String, dynamic>? additionalHeaders,
    int? statusCode,
    ContentType? contentType})
    : super._(null,
          request: request,
          validationData: value,
          additionalHeaders: (additionalHeaders ?? <String, dynamic>{})
            ..addAll(result.headers ?? {}),
          contentType: contentType,
          statusCode: statusCode ?? result.statusCode);