copyWith method

Attachment copyWith({
  1. UserDetails? author,
  2. String? content,
  3. DateTime? created,
  4. String? filename,
  5. String? id,
  6. String? mimeType,
  7. String? self,
  8. int? size,
  9. String? thumbnail,
})

Implementation

Attachment copyWith(
    {UserDetails? author,
    String? content,
    DateTime? created,
    String? filename,
    String? id,
    String? mimeType,
    String? self,
    int? size,
    String? thumbnail}) {
  return Attachment(
    author: author ?? this.author,
    content: content ?? this.content,
    created: created ?? this.created,
    filename: filename ?? this.filename,
    id: id ?? this.id,
    mimeType: mimeType ?? this.mimeType,
    self: self ?? this.self,
    size: size ?? this.size,
    thumbnail: thumbnail ?? this.thumbnail,
  );
}