toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() => {
      'name': name,
      'cost': cost,
      'quantity': quantity,
      'productAdvertiseID': productAdvertiseID,
      'productSoldOut': productSoldOut,
      'productVariant': productVariant,
      'categories':
          categories?.map((key, value) => MapEntry(key.toString(), value)),
      'ecommerceParameters': ecommerceParameters
          ?.map((key, value) => MapEntry(key.toString(), value))
    };