Response<T> constructor

Response<T>({
  1. T? data,
  2. required RequestOptions requestOptions,
  3. int? statusCode,
  4. String? statusMessage,
  5. bool isRedirect = false,
  6. List<RedirectRecord> redirects = const [],
  7. Map<String, dynamic>? extra,
  8. Headers? headers,
})

Implementation

Response({
  this.data,
  required this.requestOptions,
  this.statusCode,
  this.statusMessage,
  this.isRedirect = false,
  this.redirects = const [],
  Map<String, dynamic>? extra,
  Headers? headers,
})  : headers = headers ??
          Headers(preserveHeaderCase: requestOptions.preserveHeaderCase),
      extra = extra ?? <String, dynamic>{};