ShadertoyWSOptions constructor
ShadertoyWSOptions({})
Builds a ShadertoyWSOptions
- apiKey: The API key
apiPath
: The base api path, defaults to ShadertoyWSOptions.defaultApiPathbaseUrl
: The Shadertoy base urlpoolMaxAllocatedResources
: The maximum number of resources allocated for parallel callspoolTimeout
: The timeout before giving up on a callretryMaxAttempts
: The maximum number of attempts at a failed requestshaderCount
: The number of shaders fetched in a paged callerrorHandling
: 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');
}