toMap method
Implementation
Map<String, dynamic> toMap() {
return {
'communityId': communityId,
'channelId': channelId,
'userId': userId,
'displayName': displayName,
'description': description,
'avatarFileId': avatarFileId,
'isOfficial': isOfficial,
'isPublic': isPublic,
'onlyAdminCanPost': onlyAdminCanPost,
'metadata': metadata,
'postsCount': postsCount,
'membersCount': membersCount,
'isJoined': isJoined,
'isDeleted': isDeleted,
'categoryIds': categoryIds,
'categories': categories?.map((x) => x?.toMap()).toList(),
'tags': tags,
'user': user?.toMap(),
'avatarImage': avatarImage?.getUrl(AmityImageSize.MEDIUM),
'isPostReviewEnabled': isPostReviewEnabled,
'createdAt': createdAt?.millisecondsSinceEpoch,
'updatedAt': updatedAt?.millisecondsSinceEpoch,
'path': path,
'allowCommentInStory': allowCommentInStory,
};
}