ImageAi class

ImageAi class This class is used to generate images using the Pollinations API.

Constructors

ImageAi({String model = "flux", dynamic seed = "random", int width = 1024, int height = 1024, bool enhance = false, bool private = false, bool safe = false, String referrer = "pollinations.py"})
Constructor for ImageAi class.

Properties

enhance bool
getter/setter pair
file String
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
height int
getter/setter pair
model String
getter/setter pair
getter/setter pair
private bool
getter/setter pair
prompt String?
getter/setter pair
referrer String
getter/setter pair
response ↔ dynamic
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
safe bool
getter/setter pair
seed ↔ dynamic
getter/setter pair
timestamp DateTime
getter/setter pair
width int
getter/setter pair

Methods

call(String prompt) Future<ImageAi>
Calls the Pollinations API to generate an image based on the provided prompt.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
save(String filePath) Future<ImageAi>
Saves the generated image to a file.
toJson() String
toString() String
A string representation of this object.
override

Operators

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

Static Methods

models() Future<List>
Get the list of available models from the Pollinations API. @return A Future that resolves to a list of models.