copy method
ItemModel
copy(
{ - String? id,
- String? storeId,
- String? name,
- Option<String>? thumbnail,
- Option<String>? description,
- int? price,
- bool? isSoldOut,
- DateTime? updatedAt,
- DateTime? createdAt,
- Iterable<ItemOptionModel>? options,
})
Implementation
ItemModel copy({
String? id,
String? storeId,
String? name,
Option<String>? thumbnail,
Option<String>? description,
int? price,
bool? isSoldOut,
DateTime? updatedAt,
DateTime? createdAt,
Iterable<ItemOptionModel>? options,
}) {
return ItemModel(
id: id ?? this.id,
storeId: storeId ?? this.storeId,
name: name ?? this.name,
thumbnail: thumbnail != null ? thumbnail.value : this.thumbnail,
description: description != null ? description.value : this.description,
isSoldOut: isSoldOut ?? this.isSoldOut,
updatedAt: updatedAt ?? this.updatedAt,
createdAt: createdAt ?? this.createdAt,
options: options ?? this.options,
);
}