copyWith method

CompressionOptions copyWith({
  1. int? maxBytes,
  2. int? quality,
  3. int? minQuality,
  4. int? maxWidth,
  5. int? maxHeight,
  6. OutputFormat? format,
  7. bool? autoOrientation,
  8. bool? keepExif,
})

Creates a copy of this CompressionOptions with specified attributes updated.

Implementation

CompressionOptions copyWith({
  int? maxBytes,
  int? quality,
  int? minQuality,
  int? maxWidth,
  int? maxHeight,
  OutputFormat? format,
  bool? autoOrientation,
  bool? keepExif,
}) {
  return CompressionOptions(
    maxBytes: maxBytes ?? this.maxBytes,
    quality: quality ?? this.quality,
    minQuality: minQuality ?? this.minQuality,
    maxWidth: maxWidth ?? this.maxWidth,
    maxHeight: maxHeight ?? this.maxHeight,
    format: format ?? this.format,
    autoOrientation: autoOrientation ?? this.autoOrientation,
    keepExif: keepExif ?? this.keepExif,
  );
}