Product constructor Null safety

Product(
  1. {int? id,
  2. String? productCode,
  3. String? promoText,
  4. String? bogoPromoText,
  5. double? price,
  6. double? finalPrice,
  7. double? discountValue,
  8. double? discountType,
  9. bool? isAddedtoWishlist,
  10. bool? isOutOfStock,
  11. bool? preOrder,
  12. String? availabilityDate,
  13. String? croppedImageUrl,
  14. bool? enableCropping,
  15. int? colorOptions,
  16. int? colorId,
  17. int? sizeId,
  18. String? size,
  19. String? color,
  20. List<Size>? sizes,
  21. List<ColorModel>? colors}
)

Implementation

Product({
  this.id,
  this.productCode,
  this.promoText,
  this.bogoPromoText,
  this.price,
  this.finalPrice,
  this.discountValue,
  this.discountType,
  this.isAddedtoWishlist,
  this.isOutOfStock,
  this.preOrder,
  this.availabilityDate,
  this.croppedImageUrl,
  this.enableCropping,
  this.colorOptions,
  this.colorId,
  this.sizeId,
  this.size,
  this.color,
  this.sizes,
  this.colors,
});