toMap method

Map<String, dynamic> toMap()

Implementation

Map<String, dynamic> toMap() => <String, dynamic>{
  "title": title,
  "code": code,
  "subtitle": subtitle,
  "description": description,
  "slug": slug,
  "type": type,
  "content": content,
  "latitude": latitude,
  "longitude": longitude,
  "stock": stock,
  "parentId": parentId,
  "creatorId": creatorId,
  "point": point,
  "actionType": actionType,
  "actionTitle": actionTitle,
  "actionUri": actionUri,
  "details": details,
  "relatedProducts": relatedProducts == null ? null : List<dynamic>.from(relatedProducts!.map((dynamic x) => x)),
  "addRelatedProducts": addRelatedProducts == null ? null : List<dynamic>.from(addRelatedProducts!.map((dynamic x) => x)),
  "removeRelatedProducts": removeRelatedProducts == null ? null : List<dynamic>.from(removeRelatedProducts!.map((dynamic x) => x)),
  "addCategories": addCategories == null ? null : List<dynamic>.from(addCategories!.map((dynamic x) => x)),
  "removeCategories": removeCategories == null ? null : List<dynamic>.from(removeCategories!.map((dynamic x) => x)),
  "categories": categories == null ? null : List<dynamic>.from(categories!.map((dynamic x) => x)),
  "id": id,
  "phoneNumber": phoneNumber,
  "address": address,
  "addTags": addTags == null ? null : List<dynamic>.from(addTags!.map((dynamic x) => x)),
  "removeTags": removeTags == null ? null : List<dynamic>.from(removeTags!.map((dynamic x) => x)),
  "tags": tags == null ? null : List<dynamic>.from(tags!.map((dynamic x) => x)),
  "detail1": detail1,
  "detail2": detail2,
  "adminUserIds": adminUserIds == null ? <dynamic>[] : List<dynamic>.from(adminUserIds!.map((String x) => x)),
  "addAdminUserIds": addAdminUserIds == null ? <dynamic>[] : List<dynamic>.from(addAdminUserIds!.map((String x) => x)),
  "removeAdminUserIds": removeAdminUserIds == null ? <dynamic>[] : List<dynamic>.from(removeAdminUserIds!.map((String x) => x)),
  "order": order,
  "media": media == null ? <dynamic>[] : List<dynamic>.from(media!.map((String x) => x)),
};