Request constructor

Request({
  1. RequestType? type,
  2. String? url,
  3. String? body,
  4. Map<String, String>? headers,
  5. String? response,
  6. bool? isError,
  7. String? stackTrace,
})

Implementation

factory Request({
  RequestType? type,
  $core.String? url,
  $core.String? body,
  $core.Map<$core.String, $core.String>? headers,
  $core.String? response,
  $core.bool? isError,
  $core.String? stackTrace,
}) {
  final _result = create();
  if (type != null) {
    _result.type = type;
  }
  if (url != null) {
    _result.url = url;
  }
  if (body != null) {
    _result.body = body;
  }
  if (headers != null) {
    _result.headers.addAll(headers);
  }
  if (response != null) {
    _result.response = response;
  }
  if (isError != null) {
    _result.isError = isError;
  }
  if (stackTrace != null) {
    _result.stackTrace = stackTrace;
  }
  return _result;
}