copy method
StoreModel
copy(
{ - String? id,
- String? name,
- Option<String>? description,
- Option<String>? thumbnail,
- String? apartmentId,
- String? phone,
- bool? activated,
- int? throttle,
- DateTime? updatedAt,
- DateTime? createdAt,
- Iterable<AvailableTakeoutModel>? availableTakeouts,
- Iterable<ItemModel>? items,
})
Implementation
StoreModel copy({
String? id,
String? name,
Option<String>? description,
Option<String>? thumbnail,
String? apartmentId,
String? phone,
bool? activated,
int? throttle,
DateTime? updatedAt,
DateTime? createdAt,
Iterable<AvailableTakeoutModel>? availableTakeouts,
Iterable<ItemModel>? items,
}) {
return StoreModel(
id: id ?? this.id,
name: name ?? this.name,
description: description != null ? description.value : this.description,
thumbnail: thumbnail != null ? thumbnail.value : this.thumbnail,
apartmentId: apartmentId ?? this.apartmentId,
phone: phone ?? this.phone,
activated: activated ?? this.activated,
throttle: throttle ?? this.throttle,
updatedAt: updatedAt ?? this.updatedAt,
createdAt: createdAt ?? this.createdAt,
availableTakeouts: availableTakeouts ?? this.availableTakeouts,
items: items ?? this.items,
);
}