copyWith method

ImageGeneratioConfigs copyWith({
  1. bool? captureOnlyBackgroundImageArea,
  2. bool? allowEmptyEditCompletion,
  3. bool? generateInsideSeparateThread,
  4. bool? generateImageInBackground,
  5. bool? captureOnlyDrawingBounds,
  6. bool? awaitLoadingDialogContext,
  7. double? customPixelRatio,
  8. ProcessorConfigs? processorConfigs,
  9. OutputFormat? outputFormat,
  10. bool? singleFrame,
  11. int? pngLevel,
  12. PngFilter? pngFilter,
  13. int? jpegQuality,
  14. Size? maxOutputSize,
  15. Size? maxThumbnailSize,
  16. JpegChroma? jpegChroma,
})

Creates a copy of this object with the given fields replaced with the new values.

The copyWith method allows you to create a new instance of ImageGeneratioConfigs with some properties updated while keeping the others unchanged.

Implementation

ImageGeneratioConfigs copyWith({
  bool? captureOnlyBackgroundImageArea,
  bool? allowEmptyEditCompletion,
  bool? generateInsideSeparateThread,
  bool? generateImageInBackground,
  bool? captureOnlyDrawingBounds,
  bool? awaitLoadingDialogContext,
  double? customPixelRatio,
  ProcessorConfigs? processorConfigs,
  OutputFormat? outputFormat,
  bool? singleFrame,
  int? pngLevel,
  PngFilter? pngFilter,
  int? jpegQuality,
  Size? maxOutputSize,
  Size? maxThumbnailSize,
  JpegChroma? jpegChroma,
}) {
  return ImageGeneratioConfigs(
    captureOnlyBackgroundImageArea:
        captureOnlyBackgroundImageArea ?? this.captureOnlyBackgroundImageArea,
    allowEmptyEditCompletion:
        allowEmptyEditCompletion ?? this.allowEmptyEditCompletion,
    generateInsideSeparateThread:
        generateInsideSeparateThread ?? this.generateInsideSeparateThread,
    generateImageInBackground:
        generateImageInBackground ?? this.generateImageInBackground,
    captureOnlyDrawingBounds:
        captureOnlyDrawingBounds ?? this.captureOnlyDrawingBounds,
    awaitLoadingDialogContext:
        awaitLoadingDialogContext ?? this.awaitLoadingDialogContext,
    customPixelRatio: customPixelRatio ?? this.customPixelRatio,
    processorConfigs: processorConfigs ?? this.processorConfigs,
    outputFormat: outputFormat ?? this.outputFormat,
    singleFrame: singleFrame ?? this.singleFrame,
    pngLevel: pngLevel ?? this.pngLevel,
    pngFilter: pngFilter ?? this.pngFilter,
    jpegQuality: jpegQuality ?? this.jpegQuality,
    maxOutputSize: maxOutputSize ?? this.maxOutputSize,
    maxThumbnailSize: maxThumbnailSize ?? this.maxThumbnailSize,
    jpegChroma: jpegChroma ?? this.jpegChroma,
  );
}