copyWith method
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,
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,
);
}