toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() => {
      if (negativePrompt != null) 'negativePrompt': negativePrompt,
      'sampleCount': numberOfImages ?? 1,
      if (aspectRatio != null) 'aspectRatio': aspectRatio!.toJson(),
      if (addWatermark != null) 'addWatermark': addWatermark,
      if (imageFormat != null) 'outputOptions': imageFormat!.toJson(),
    };