copyWith method

  1. @override
ApiGetRequestOptions copyWith({
  1. Map<String, String>? headers,
  2. Map<String, String>? cookies,
  3. bool? noAuth,
  4. bool? retry,
  5. bool clearRetry = false,
  6. bool? retryUnsafeRequest,
  7. String? idempotencyKey,
  8. CancelToken? cancelToken,
  9. String? operationId,
  10. ApiCallLogOptions? log,
  11. bool clearLog = false,
  12. List<String>? invalidateCacheTags,
  13. List<String>? invalidateCachePaths,
  14. bool? clearActiveSessionCache,
  15. bool? cache,
  16. ApiCachePolicy? cachePolicy,
  17. bool clearCachePolicy = false,
  18. Duration? cacheTtl,
  19. bool clearCacheTtl = false,
  20. bool? forceRefresh,
  21. bool? invalidateCache,
  22. List<String>? cacheTags,
  23. List<String>? varyHeaders,
})
override

Implementation

@override
ApiGetRequestOptions copyWith({
  Map<String, String>? headers,
  Map<String, String>? cookies,
  bool? noAuth,
  bool? retry,
  bool clearRetry = false,
  bool? retryUnsafeRequest,
  String? idempotencyKey,
  CancelToken? cancelToken,
  String? operationId,
  ApiCallLogOptions? log,
  bool clearLog = false,
  List<String>? invalidateCacheTags,
  List<String>? invalidateCachePaths,
  bool? clearActiveSessionCache,
  bool? cache,
  ApiCachePolicy? cachePolicy,
  bool clearCachePolicy = false,
  Duration? cacheTtl,
  bool clearCacheTtl = false,
  bool? forceRefresh,
  bool? invalidateCache,
  List<String>? cacheTags,
  List<String>? varyHeaders,
}) =>
    ApiGetRequestOptions(
      headers: headers ?? this.headers,
      cookies: cookies ?? this.cookies,
      noAuth: noAuth ?? this.noAuth,
      retry: clearRetry ? null : retry ?? this.retry,
      retryUnsafeRequest: retryUnsafeRequest ?? this.retryUnsafeRequest,
      idempotencyKey: idempotencyKey ?? this.idempotencyKey,
      cancelToken: cancelToken ?? this.cancelToken,
      operationId: operationId ?? this.operationId,
      log: clearLog ? null : log ?? this.log,
      invalidateCacheTags: invalidateCacheTags ?? this.invalidateCacheTags,
      invalidateCachePaths: invalidateCachePaths ?? this.invalidateCachePaths,
      clearActiveSessionCache:
          clearActiveSessionCache ?? this.clearActiveSessionCache,
      cache: cache ?? this.cache,
      cachePolicy: clearCachePolicy ? null : cachePolicy ?? this.cachePolicy,
      cacheTtl: clearCacheTtl ? null : cacheTtl ?? this.cacheTtl,
      forceRefresh: forceRefresh ?? this.forceRefresh,
      invalidateCache: invalidateCache ?? this.invalidateCache,
      cacheTags: cacheTags ?? this.cacheTags,
      varyHeaders: varyHeaders ?? this.varyHeaders,
    );