copyWith method

FilePickerConfig copyWith(
  1. {int? videoCompressionLevel,
  2. int? maxFilesAllowed,
  3. int? maxFileSize,
  4. int? maxPixelSize,
  5. Set<String>? allowedExtensions,
  6. bool? useLiveMediaOnly,
  7. List<FilePickerOptions>? options}
)

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

Implementation

FilePickerConfig copyWith({
  int? videoCompressionLevel,
  int? maxFilesAllowed,
  int? maxFileSize,
  int? maxPixelSize,
  Set<String>? allowedExtensions,
  bool? useLiveMediaOnly,
  List<FilePickerOptions>? options,
}) {
  return FilePickerConfig(
    maxFilesAllowed: maxFilesAllowed ?? this.maxFilesAllowed,
    videoCompressionLevel: videoCompressionLevel ?? this.videoCompressionLevel,
    maxFileSize: maxFileSize ?? this.maxFileSize,
    maxPixelSize: maxPixelSize ?? this.maxPixelSize,
    allowedExtensions: allowedExtensions ?? this.allowedExtensions,
    options: options ?? this.options,
    useLiveMediaOnly: useLiveMediaOnly ?? this.useLiveMediaOnly,
  );
}