ImageRequest class

ImageRequest class internal to ImageAi This class is used to create a request for generating an image using the Pollinations API.

Constructors

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

Properties

enhance bool
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
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
safe bool
getter/setter pair
seed ↔ dynamic
getter/setter pair
seedValue int
no setter
timestamp DateTime
getter/setter pair
width int
getter/setter pair

Methods

call() Future<Response>
Calls the Pollinations API to generate an image based on the provided prompt. @return A Future that resolves to an http.Response object with the generated image.
computeSeedValue() int
Computes the seed value based on the provided seed parameter. If the seed is "random", it generates a random seed else it returns current value seed. @return The computed seed value.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() String
toString() String
A string representation of this object.
override

Operators

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