copyWith method

FileAttachment copyWith({
  1. String? id,
  2. String? url,
  3. String? name,
  4. String? extension,
  5. int? size,
  6. String? mimeType,
  7. int? pageCount,
  8. String? thumbnailUrl,
  9. FileUploadStatus? uploadStatus,
  10. double? uploadProgress,
  11. String? localPath,
  12. int? width,
  13. int? height,
  14. String? thumbhash,
  15. String? blurhash,
  16. Duration? duration,
  17. List<double>? waveform,
})

Creates a copy with updated fields.

Implementation

FileAttachment copyWith({
  String? id,
  String? url,
  String? name,
  String? extension,
  int? size,
  String? mimeType,
  int? pageCount,
  String? thumbnailUrl,
  FileUploadStatus? uploadStatus,
  double? uploadProgress,
  String? localPath,
  int? width,
  int? height,
  String? thumbhash,
  String? blurhash,
  Duration? duration,
  List<double>? waveform,
}) {
  return FileAttachment(
    id: id ?? this.id,
    url: url ?? this.url,
    name: name ?? this.name,
    extension: extension ?? this.extension,
    size: size ?? this.size,
    mimeType: mimeType ?? this.mimeType,
    pageCount: pageCount ?? this.pageCount,
    thumbnailUrl: thumbnailUrl ?? this.thumbnailUrl,
    uploadStatus: uploadStatus ?? this.uploadStatus,
    uploadProgress: uploadProgress ?? this.uploadProgress,
    localPath: localPath ?? this.localPath,
    width: width ?? this.width,
    height: height ?? this.height,
    thumbhash: thumbhash ?? this.thumbhash,
    blurhash: blurhash ?? this.blurhash,
    duration: duration ?? this.duration,
    waveform: waveform ?? this.waveform,
  );
}