editImage method
Creates an edited or extended image given an original image and a prompt. Provide a mask is optional An mask is: An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where image should be edited. Must be a valid PNG file, less than 4MB, and have the same dimensions as image. The image to edit. Must be a valid PNG file, less than 4MB, and square. If mask is not provided, image must have transparency, which will be used as the mask.
Implementation
Future<ImagesResponse> editImage({
required File image,
File? mask,
required String prompt,
}) async {
try {
_checkApi(values: [prompt]);
final result = await service.editImage(
prompt: prompt,
image: image,
apiKey: _apiKey,
config: _configImages,
mask: mask);
return result;
} catch (e) {
throw _exceptionCheck(e);
}
}