copyWith method

ShadertoyWSOptions copyWith({
  1. String? apiKey,
  2. String? apiPath,
  3. String? baseUrl,
  4. int? poolMaxAllocatedResources,
  5. int? poolTimeout,
  6. int? retryMaxAttempts,
  7. int? shaderCount,
  8. ErrorMode? errorHandling,
})

Builds a copy of a ShadertoyWSOptions

  • apiKey: The API key
  • apiPath: The base api path
  • baseUrl: The Shadertoy base url
  • poolMaxAllocatedResources: The maximum number of resources allocated for parallel calls
  • poolTimeout: The timeout before giving up on a call
  • retryMaxAttempts: The maximum number of attempts at a failed request
  • shaderCount: The number of shaders fetched on a paged call
  • errorHandling: The error handling mode

Implementation

ShadertoyWSOptions copyWith(
    {String? apiKey,
    String? apiPath,
    String? baseUrl,
    int? poolMaxAllocatedResources,
    int? poolTimeout,
    int? retryMaxAttempts,
    int? shaderCount,
    ErrorMode? errorHandling}) {
  return ShadertoyWSOptions(
      apiKey: apiKey ?? this.apiKey,
      apiPath: apiPath ?? this.apiPath,
      baseUrl: baseUrl ?? this.baseUrl,
      poolMaxAllocatedResources:
          poolMaxAllocatedResources ?? this.poolMaxAllocatedResources,
      poolTimeout: poolTimeout ?? this.poolTimeout,
      retryMaxAttempts: retryMaxAttempts ?? this.retryMaxAttempts,
      shaderCount: shaderCount ?? this.shaderCount,
      errorHandling: errorHandling ?? this.errorHandling);
}