copyWith method

  1. @override
ImageCompressionOptions copyWith({
  1. String? outputFormat,
  2. bool? keepMetadata,
  3. Map<String, dynamic>? customOptions,
  4. int? quality,
  5. int? maxWidth,
  6. int? maxHeight,
  7. bool? progressive,
  8. bool? stripMetadata,
  9. String? format,
})
override

Create a copy with updated values

Implementation

@override
ImageCompressionOptions copyWith({
  String? outputFormat,
  bool? keepMetadata,
  Map<String, dynamic>? customOptions,
  int? quality,
  int? maxWidth,
  int? maxHeight,
  bool? progressive,
  bool? stripMetadata,
  String? format,
}) {
  return ImageCompressionOptions(
    outputFormat: outputFormat ?? this.outputFormat,
    keepMetadata: keepMetadata ?? this.keepMetadata,
    customOptions: customOptions ?? this.customOptions,
    quality: quality ?? this.quality,
    maxWidth: maxWidth ?? this.maxWidth,
    maxHeight: maxHeight ?? this.maxHeight,
    progressive: progressive ?? this.progressive,
    stripMetadata: stripMetadata ?? this.stripMetadata,
    format: format ?? this.format,
  );
}