copyWith method

DocumentsModel copyWith({
  1. DateTime? createdAt,
  2. String? id,
  3. Map<String, dynamic>? metadata,
  4. String? name,
  5. String? path,
  6. String? referenceNumber,
  7. int? size,
  8. String? type,
  9. DateTime? updatedAt,
  10. String? url,
})

Implementation

DocumentsModel copyWith({
  DateTime? createdAt,
  String? id,
  Map<String, dynamic>? metadata,
  String? name,
  String? path,
  String? referenceNumber,
  int? size,
  String? type,
  DateTime? updatedAt,
  String? url,
}) {
  return DocumentsModel(
    createdAt: createdAt ?? this.createdAt,
    id: id ?? this.id,
    metadata: metadata ?? this.metadata,
    name: name ?? this.name,
    path: path ?? this.path,
    referenceNumber: referenceNumber ?? this.referenceNumber,
    size: size ?? this.size,
    type: type ?? this.type,
    updatedAt: updatedAt ?? this.updatedAt,
    url: url ?? this.url,
  );
}