copyWith method
Creates a copy of this document but with the given fields replaced with the new values.
Implementation
Document copyWith({
int? id,
String? name,
String? createdAt,
String? url,
String? origUrl,
String? textUrl,
int? dashboardId,
List<Attachment>? attachments,
}) {
return Document(
id: id ?? this.id,
name: name ?? this.name,
createdAt: createdAt ?? this.createdAt,
url: url ?? this.url,
origUrl: origUrl ?? this.origUrl,
textUrl: textUrl ?? this.textUrl,
dashboardId: dashboardId ?? this.dashboardId,
attachments: attachments ?? this.attachments,
);
}