toJSON method
Implementation
Map<String, dynamic> toJSON() => {
'ownerId': ownerId,
'profileName': profileName,
'profileImgUrl': profileImgUrl,
'title': title,
'content': content,
'thumbnailUrl': thumbnailUrl,
'hashtags': hashtags,
'createdTime': createdTime,
'modifiedTime': modifiedTime,
'publishedTime': publishedTime,
'position': jsonEncode(position),
'location': location,
'isDraft': isDraft,
'isHidden': isHidden,
'isCommentEnabled': isCommentEnabled,
'themeMode': themeMode,
'savedByProfiles': savedByProfiles,
'viewCount': viewCount,
'verificationLevel': verificationLevel?.name,
if (legacyPostId != null) 'legacyPostId': legacyPostId,
'slug': slug,
};