call method
- String prompt
Calls the Pollinations API to generate an image based on the provided prompt.
@param prompt The prompt to use for image generation. @return A Future that resolves to an ImageAi object with the generated image.
Implementation
Future<ImageAi> call(String prompt) async {
final effectiveSeed = seed == "random" ? randomSeed() : seed;
final request = ImageRequest(
model: model,
prompt: prompt,
seed: effectiveSeed,
width: width,
height: height,
enhance: enhance,
nologo: nologo,
private: private,
safe: safe,
referrer: referrer,
);
this.prompt = prompt;
this.response = await request.call();
return this;
}