copyWith method
Returns a copy of this attachment with the given fields replaced.
Implementation
Attachment copyWith({
String? id,
int? timestamp,
String? filename,
AttachmentState? state,
String? localUri,
String? mediaType,
int? size,
bool? hasSynced,
String? metaData,
}) {
return Attachment(
id: id ?? this.id,
timestamp: timestamp ?? this.timestamp,
filename: filename ?? this.filename,
state: state ?? this.state,
localUri: localUri ?? this.localUri,
mediaType: mediaType ?? this.mediaType,
size: size ?? this.size,
hasSynced: hasSynced ?? this.hasSynced,
metaData: metaData ?? this.metaData,
);
}