copyWith method

ProductEntity copyWith({
  1. String? documentID,
  2. String? appId,
  3. String? title,
  4. String? about,
  5. double? price,
  6. double? weight,
  7. String? shopId,
  8. List<ProductImageEntity>? images,
  9. PosSizeEntity? posSize,
})

Implementation

ProductEntity copyWith({
  String? documentID,
  String? appId,
  String? title,
  String? about,
  double? price,
  double? weight,
  String? shopId,
  List<ProductImageEntity>? images,
  PosSizeEntity? posSize,
}) {
  return ProductEntity(
    appId: appId ?? this.appId,
    title: title ?? this.title,
    about: about ?? this.about,
    price: price ?? this.price,
    weight: weight ?? this.weight,
    shopId: shopId ?? this.shopId,
    images: images ?? this.images,
    posSize: posSize ?? this.posSize,
  );
}