toMap method

Map<String, dynamic> toMap()

Implementation

Map<String, dynamic> toMap() => <String, dynamic>{
      "id": id,
      "createdAt": createdAt.toIso8601String(),
      "updatedAt": updatedAt.toIso8601String(),
      "jsonData": jsonData.toMap(),
      "tags": List<dynamic>.from(tags.map((int x) => x)),
      "title": title,
      "parentId": parentId,
      "parent": parent?.toMap(),
      "order": order,
      "children": children == null ? null : List<dynamic>.from(children!.map((UCategoryResponse x) => x.toMap())),
      "media": children == null ? null : List<dynamic>.from(media!.map((UMediaResponse x) => x.toMap())),
    };