copyWith method

ShadertoySiteOptions copyWith({
  1. String? user,
  2. String? password,
  3. String? cookieName,
  4. int? userShaderCount,
  5. int? playlistShaderCount,
  6. int? pageResultsShaderCount,
  7. int? pageUserShaderCount,
  8. int? pagePlaylistShaderCount,
  9. String? baseUrl,
  10. int? poolMaxAllocatedResources,
  11. int? poolTimeout,
  12. int? retryMaxAttempts,
  13. ErrorMode? errorHandling,
})

Builds a copy of a ShadertoySiteOptions

  • user: The Shadertoy user
  • password: The Shadertoy password
  • cookieName: The Shadertoy cookie name
  • userShaderCount: The number of shaders requested for a user paged call
  • playlistShaderCount: The number of shaders requested for a playlist paged call
  • pageResultsShaderCount: The number of shaders presented in the Shadertoy results page
  • pageUserShaderCount: The number of shaders presented in the Shadertoy user page
  • pagePlaylistShaderCount: The number of shaders presented in the Shadertoy playlist page
  • 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
  • errorHandling: The error handling mode

Implementation

ShadertoySiteOptions copyWith(
    {String? user,
    String? password,
    String? cookieName,
    int? userShaderCount,
    int? playlistShaderCount,
    int? pageResultsShaderCount,
    int? pageUserShaderCount,
    int? pagePlaylistShaderCount,
    String? baseUrl,
    int? poolMaxAllocatedResources,
    int? poolTimeout,
    int? retryMaxAttempts,
    ErrorMode? errorHandling}) {
  return ShadertoySiteOptions(
      user: user ?? this.user,
      password: password ?? this.password,
      cookieName: cookieName ?? this.cookieName,
      userShaderCount: userShaderCount ?? this.userShaderCount,
      playlistShaderCount: playlistShaderCount ?? this.playlistShaderCount,
      pageResultsShaderCount:
          pageResultsShaderCount ?? this.pageResultsShaderCount,
      pageUserShaderCount: pageUserShaderCount ?? this.pageUserShaderCount,
      pagePlaylistShaderCount:
          pagePlaylistShaderCount ?? this.pagePlaylistShaderCount,
      baseUrl: baseUrl ?? this.baseUrl,
      poolMaxAlocatedResources:
          poolMaxAllocatedResources ?? this.poolMaxAllocatedResources,
      poolTimeout: poolTimeout ?? this.poolTimeout,
      retryMaxAttempts: retryMaxAttempts ?? this.retryMaxAttempts,
      errorHandling: errorHandling ?? this.errorHandling);
}