copyWith method

Collection copyWith({
  1. String? name,
  2. List<Product>? products,
  3. Map<String, dynamic>? data,
  4. DateTime? createdAt,
})

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,
  );
}