generateImage method
Method to generate the image(s) based on the given
input prompt
request
is a required parameter
the return type can be null
Implementation
Future<Images?> generateImage({
required ImageRequest request,
}) async {
String url = '$_baseUrl/images/generations';
Response response = await _dio.post(
url,
data: request.toJson(),
options: Options(
headers: _headers,
),
);
return Images.fromJson(response.data);
}