copyWith method

CloudMediaConfig copyWith({
  1. int? maxCacheSizeMb,
  2. int? imageQuality,
  3. int? thumbnailSize,
  4. int? maxSelection,
  5. bool? enableOfflineSync,
  6. bool? enableReviewScreen,
  7. bool? enableBackgroundRemoval,
  8. Duration? uploadTimeout,
  9. int? maxRetries,
  10. bool? autoGenerateThumbnails,
  11. bool? compressAutomatically,
  12. bool? enableVideoCompression,
  13. int? videoCompressionBitrate,
  14. bool? enableLogging,
  15. String? customStorageBucket,
})

Creates a copy of this config with the given fields replaced.

Implementation

CloudMediaConfig copyWith({
  int? maxCacheSizeMb,
  int? imageQuality,
  int? thumbnailSize,
  int? maxSelection,
  bool? enableOfflineSync,
  bool? enableReviewScreen,
  bool? enableBackgroundRemoval,
  Duration? uploadTimeout,
  int? maxRetries,
  bool? autoGenerateThumbnails,
  bool? compressAutomatically,
  bool? enableVideoCompression,
  int? videoCompressionBitrate,
  bool? enableLogging,
  String? customStorageBucket,
}) {
  return CloudMediaConfig(
    maxCacheSizeMb: maxCacheSizeMb ?? this.maxCacheSizeMb,
    imageQuality: imageQuality ?? this.imageQuality,
    thumbnailSize: thumbnailSize ?? this.thumbnailSize,
    maxSelection: maxSelection ?? this.maxSelection,
    enableOfflineSync: enableOfflineSync ?? this.enableOfflineSync,
    enableReviewScreen: enableReviewScreen ?? this.enableReviewScreen,
    enableBackgroundRemoval:
        enableBackgroundRemoval ?? this.enableBackgroundRemoval,
    uploadTimeout: uploadTimeout ?? this.uploadTimeout,
    maxRetries: maxRetries ?? this.maxRetries,
    autoGenerateThumbnails:
        autoGenerateThumbnails ?? this.autoGenerateThumbnails,
    compressAutomatically:
        compressAutomatically ?? this.compressAutomatically,
    enableVideoCompression:
        enableVideoCompression ?? this.enableVideoCompression,
    videoCompressionBitrate:
        videoCompressionBitrate ?? this.videoCompressionBitrate,
    enableLogging: enableLogging ?? this.enableLogging,
    customStorageBucket: customStorageBucket ?? this.customStorageBucket,
  );
}