toMap method

Map<String, dynamic> toMap()

Implementation

Map<String, dynamic> toMap() => <String, dynamic>{
  "id": id,
  "title": title,
  "subtitle": subtitle,
  "tags": List<dynamic>.from(tags.map((int x) => x)),
  "parentId": parentId,
  "order": order,
  "location": location,
  "type": type,
  "link": link,
  "address": address,
  "phoneNumber": phoneNumber,
  "code": code,
  "relatedProducts": relatedProducts == null ? null : List<dynamic>.from(relatedProducts!.map((String x) => x)),
  "detail1": detail1,
  "detail2": detail2,
  "creatorId": creatorId,
  "adminUserIds": adminUserIds == null ? <dynamic>[] : List<dynamic>.from(adminUserIds!.map((String x) => x)),
  "children": children == null ? <UCategoryCreateParams>[] : List<UCategoryCreateParams>.from(children!.map((UCategoryCreateParams x) => x.toMap())),
  "media": media == null ? <dynamic>[] : List<dynamic>.from(media!.map((String x) => x)),
};