GeminiImageClient class final Providers

Gemini image generation over the generateContent REST endpoint.

Implemented types

Constructors

GeminiImageClient({required ProviderCredentials credentials, Client? httpClient, RetryPolicy retryPolicy = const RetryPolicy(), Uri? endpoint, Future<void> sleep(Duration) = Future.delayed})
Creates a GeminiImageClient.

Properties

credentials ProviderCredentials
The provider credentials carrying the API key.
final
endpoint Uri?
An optional endpoint override; defaults to the public Gemini host.
final
hashCode int
The hash code for this object.
no setterinherited
retryPolicy RetryPolicy
The retry policy applied to each request.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sleep Future<void> Function(Duration)
The sleep seam used between retries (injected for tests).
final

Methods

generateImage(ImageRequest request, {void onProgress(GenerationProgress)?}) Future<GenerationResult>
Generates an image for request.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited