map method

  1. @override
Map<String, dynamic> map(
  1. Product input
)
override

Implementation

@override
Map<String, dynamic> map(Product input) {
  Map<String, dynamic> productMap = {
    "productId": input.productId,
    "title": input.title,
    "linkUrlString": input.linkUrlString,
    "feature": input.feature,
    "cohort": input.cohort,
    "customFields": input.customFields,
    "imageUrlString": input.imageUrlString,
    "zoomImageUrlString": input.zoomImageUrlString,
    "categoryPath": input.categoryPath,
    "available": input.available,
    "productDescription": input.productDescription,
    "price": input.price,
    "msrp": input.msrp,
    "album": input.album,
    "actor": input.actor,
    "artist": input.artist,
    "author": input.author,
    "brand": input.brand,
    "year": input.year,
  };
  productMap.removeWhere((key, value) => value == null);
  return productMap;
}