ShadertoyWSOptions constructor

ShadertoyWSOptions({
  1. required 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 ShadertoyWSOptions

  • apiKey: The API key
  • apiPath: The base api path, defaults to ShadertoyWSOptions.defaultApiPath
  • 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 in a paged call
  • errorHandling: The error handling mode

Implementation

ShadertoyWSOptions(
    {required this.apiKey,
    String? apiPath,
    String? baseUrl,
    int? poolMaxAllocatedResources,
    int? poolTimeout,
    int? retryMaxAttempts,
    int? shaderCount,
    ErrorMode? errorHandling})
    : assert(apiKey.isNotEmpty, 'apiKey not empty'),
      apiPath = apiPath ?? defaultApiPath,
      super(
          baseUrl: baseUrl,
          supportsCookies: false,
          poolMaxAllocatedResources: poolMaxAllocatedResources,
          poolTimeout: poolTimeout,
          retryMaxAttempts: retryMaxAttempts,
          shaderCount: shaderCount,
          errorHandling: errorHandling) {
  assert(this.apiPath.isNotEmpty, 'apiPath is not empty');
}