copyWith method

  1. @override
ProductModel copyWith({
  1. String? documentID,
  2. String? appId,
  3. String? title,
  4. String? about,
  5. double? price,
  6. double? weight,
  7. ShopModel? shop,
  8. List<ProductImageModel>? images,
  9. PosSizeModel? posSize,
})
override

Implementation

@override
ProductModel copyWith({
  String? documentID,
  String? appId,
  String? title,
  String? about,
  double? price,
  double? weight,
  ShopModel? shop,
  List<ProductImageModel>? images,
  PosSizeModel? posSize,
}) {
  return ProductModel(
    documentID: documentID ?? this.documentID,
    appId: appId ?? this.appId,
    title: title ?? this.title,
    about: about ?? this.about,
    price: price ?? this.price,
    weight: weight ?? this.weight,
    shop: shop ?? this.shop,
    images: images ?? this.images,
    posSize: posSize ?? this.posSize,
  );
}