ImageGeneratioConfigs constructor

const ImageGeneratioConfigs({
  1. bool captureOnlyBackgroundImageArea = true,
  2. bool allowEmptyEditCompletion = true,
  3. bool generateInsideSeparateThread = true,
  4. bool generateImageInBackground = !kIsWeb || !kDebugMode,
  5. bool captureOnlyDrawingBounds = true,
  6. bool awaitLoadingDialogContext = false,
  7. double? customPixelRatio,
  8. int pngLevel = 6,
  9. PngFilter pngFilter = PngFilter.none,
  10. bool singleFrame = false,
  11. int jpegQuality = 100,
  12. JpegChroma jpegChroma = JpegChroma.yuv444,
  13. OutputFormat outputFormat = OutputFormat.jpg,
  14. ProcessorConfigs processorConfigs = const ProcessorConfigs(),
  15. Size maxOutputSize = const Size(2000, 2000),
  16. Size maxThumbnailSize = const Size(100, 100),
})

Creates a new instance of ImageGeneratioConfigs.

Implementation

const ImageGeneratioConfigs({
  this.captureOnlyBackgroundImageArea = true,
  this.allowEmptyEditCompletion = true,
  this.generateInsideSeparateThread = true,
  this.generateImageInBackground = !kIsWeb || !kDebugMode,
  this.captureOnlyDrawingBounds = true,
  this.awaitLoadingDialogContext = false,
  this.customPixelRatio,
  this.pngLevel = 6,
  this.pngFilter = PngFilter.none,
  this.singleFrame = false,
  this.jpegQuality = 100,
  this.jpegChroma = JpegChroma.yuv444,
  this.outputFormat = OutputFormat.jpg,
  this.processorConfigs = const ProcessorConfigs(),
  this.maxOutputSize = const Size(2000, 2000),
  this.maxThumbnailSize = const Size(100, 100),
})  : assert(jpegQuality > 0 && jpegQuality <= 100,
          'jpegQuality must be between 1 and 100'),
      assert(captureOnlyDrawingBounds || !captureOnlyBackgroundImageArea,
          'When [captureOnlyDrawingBounds] is true must [captureOnlyBackgroundImageArea] be false'),
      assert(
          pngLevel >= 0 && pngLevel <= 9, 'pngLevel must be between 0 and 9'),
      assert(customPixelRatio == null || customPixelRatio > 0,
          'customPixelRatio must be greater than 0');