Product constructor

Product({
  1. required String productId,
  2. required String title,
  3. required String linkUrlString,
  4. required String feature,
  5. required String cohort,
  6. required Map customFields,
  7. String? imageUrlString,
  8. String? zoomImageUrlString,
  9. String? categoryPath,
  10. bool? available,
  11. String? productDescription,
  12. double? price,
  13. double? msrp,
  14. String? album,
  15. String? actor,
  16. String? artist,
  17. String? author,
  18. String? brand,
  19. int? year,
})

Implementation

Product(
    {required this.productId,
    required this.title,
    required this.linkUrlString,
    required this.feature,
    required this.cohort,
    required this.customFields,
    this.imageUrlString,
    this.zoomImageUrlString,
    this.categoryPath,
    this.available,
    this.productDescription,
    this.price,
    this.msrp,
    this.album,
    this.actor,
    this.artist,
    this.author,
    this.brand,
    this.year})
    : linkUrl = Uri.parse(linkUrlString),
      imageUrl = imageUrlString != null ? Uri.parse(imageUrlString) : null,
      zoomImageUrl =
          zoomImageUrlString != null ? Uri.parse(zoomImageUrlString) : null;