copyWith method
Product
copyWith(
{ - String? id,
- double? price,
- String? name,
- bool? isAvailable,
- List<String>? images,
- int? max,
- Status? status,
- String? description,
- List<int>? counts,
- DateTime? createdAt,
})
Implementation
Product copyWith({
String? id,
double? price,
String? name,
bool? isAvailable,
List<String>? images,
int? max,
Status? status,
String? description,
List<int>? counts,
DateTime? createdAt,
}) {
return Product(
id: id ?? this.id,
price: price ?? this.price,
name: name ?? this.name,
isAvailable: isAvailable ?? this.isAvailable,
images: images ?? this.images,
max: max ?? this.max,
status: status ?? this.status,
description: description ?? this.description,
counts: counts ?? this.counts,
createdAt: createdAt ?? this.createdAt,
);
}