newShadertoyHybridClient function
ShadertoyHybrid
newShadertoyHybridClient({
- String? user,
- String? password,
- String? cookieName,
- int? userShaderCount,
- int? playlistShaderCount,
- int? pageResultsShaderCount,
- int? pageUserShaderCount,
- int? pagePlaylistShaderCount,
- String? apiKey,
- String? apiPath,
- String? baseUrl,
- int? poolMaxAllocatedResources,
- int? poolTimeout,
- int? retryMaxAttempts,
- int? shaderCount,
- ErrorMode? errorHandling,
- Dio? client,
Creates ShadertoyHybrid backed by a ShadertoyHybridClient
user
: The Shadertoy userpassword
: The Shadertoy passwordcookieName
: The Shadertoy cookie nameuserShaderCount
: The number of shaders requested for a user paged callplaylistShaderCount
: The number of shaders requested for a playlist paged callpageResultsShaderCount
: The number of shaders presented in the Shadertoy results pagepageUserShaderCount
: The number of shaders presented in the Shadertoy user pagepagePlaylistShaderCount
: The number of shaders presented in the Shadertoy playlist pagebaseUrl
: 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 modeclient
: A pre-initializedDio
client
Implementation
ShadertoyHybrid newShadertoyHybridClient(
{String? user,
String? password,
String? cookieName,
int? userShaderCount,
int? playlistShaderCount,
int? pageResultsShaderCount,
int? pageUserShaderCount,
int? pagePlaylistShaderCount,
String? apiKey,
String? apiPath,
String? baseUrl,
int? poolMaxAllocatedResources,
int? poolTimeout,
int? retryMaxAttempts,
int? shaderCount,
ErrorMode? errorHandling,
Dio? client}) {
return ShadertoyHybridClient(
ShadertoySiteOptions(
user: user,
password: password,
cookieName: cookieName,
userShaderCount: userShaderCount,
playlistShaderCount: playlistShaderCount,
pageResultsShaderCount: pageResultsShaderCount,
pageUserShaderCount: pageUserShaderCount,
pagePlaylistShaderCount: pagePlaylistShaderCount,
baseUrl: baseUrl,
poolMaxAlocatedResources: poolMaxAllocatedResources,
poolTimeout: poolTimeout,
retryMaxAttempts: retryMaxAttempts,
errorHandling: errorHandling),
wsOptions: apiKey != null
? ShadertoyWSOptions(
apiKey: apiKey,
apiPath: apiPath,
baseUrl: baseUrl,
poolMaxAllocatedResources: poolMaxAllocatedResources,
poolTimeout: poolTimeout,
retryMaxAttempts: retryMaxAttempts,
shaderCount: shaderCount,
errorHandling: errorHandling)
: null,
client: client);
}