copyWith method

Compression copyWith(
  1. {int? quality,
  2. int? minWidth,
  3. int? minHeight,
  4. int? maxFileSize,
  5. CompressFormat? format,
  6. int? inSampleSize,
  7. int? rotate,
  8. bool? autoCorrectionAngle,
  9. bool? keepExif,
  10. int? numberOfRetries}
)

Creates a copy of this compression, but with the given fields replaced wih the new values.

Implementation

Compression copyWith({
  int? quality,
  int? minWidth,
  int? minHeight,
  int? maxFileSize,
  CompressFormat? format,
  int? inSampleSize,
  int? rotate,
  bool? autoCorrectionAngle,
  bool? keepExif,
  int? numberOfRetries,
}) {
  return Compression(
    maxFileSize: maxFileSize ?? this.maxFileSize,
    quality: quality ?? this.quality,
    minWidth: minWidth ?? this.minWidth,
    minHeight: minHeight ?? this.minHeight,
    format: format ?? this.format,
    inSampleSize: inSampleSize ?? this.inSampleSize,
    rotate: rotate ?? this.rotate,
    autoCorrectionAngle: autoCorrectionAngle ?? this.autoCorrectionAngle,
    keepExif: keepExif ?? this.keepExif,
    numberOfRetries: numberOfRetries ?? this.numberOfRetries,
  );
}