toMap method

Map<String, Object?> toMap()

Implementation

Map<String, Object?> toMap() {
  return <String, Object?>{
    if (id != null) 'id': id,
    if (name != null) 'name': name,
    if (locationId != null) 'location_id': locationId,
    if (brand != null) 'brand': brand,
    if (currency != null) 'currency': currency,
    if (price != null) 'price': price,
    if (quantity != null) 'quantity': quantity,
    if (creativeName != null) 'creative_name': creativeName,
    if (creativeSlot != null) 'creative_slot': creativeSlot,
    if (category != null) 'category': category,
    if (category2 != null) 'category2': category2,
    if (category3 != null) 'category3': category3,
    if (category4 != null) 'category4': category4,
    if (category5 != null) 'category5': category5,
    if (attributes != null) ...attributes!,
  };
}