copyWith method
Implementation
Collection copyWith({
String? name,
List<Product>? products,
Map<String, dynamic>? data,
DateTime? createdAt,
}) {
return Collection(
name: name ?? this.name,
products: products ?? this.products,
data: data ?? this.data,
createdAt: createdAt ?? this.createdAt,
);
}