toMap method

Map<String, dynamic> toMap()

Implementation

Map<String, dynamic> toMap() => <String, dynamic>{
  "id": id,
  "createdAt": createdAt.toIso8601String(),
  "jsonData": jsonData.toMap(),
  "tags": List<int>.from(tags.map((int x) => x)),
  "creator": creator?.toMap(),
  "creatorId": creatorId,
  "adminUserIds": List<String>.from(adminUserIds.map((String x) => x)),
  "title": title,
  "subtitle": subtitle,
  "slug": slug,
  "content": content,
  "media": media == null ? <UMediaResponse>[] : List<UMediaResponse>.from(media!.map((UMediaResponse x) => x.toMap())),
  "categories": categories == null ? <UCategoryResponse>[] : List<UCategoryResponse>.from(categories!.map((UCategoryResponse x) => x.toMap())),
  "comments": comments == null ? <UCommentResponse>[] : List<UCommentResponse>.from(comments!.map((UCommentResponse x) => x.toMap())),
  "commentCount": commentCount,
  "code": code,
  "description": description,
  "type": type,
  "latitude": latitude,
  "longitude": longitude,
  "parentId": parentId,
  "children": children == null ? <UBlogResponse>[] : List<UBlogResponse>.from(children!.map((UBlogResponse x) => x.toMap())),
  "childrenCount": childrenCount,
};