toDocument method
Implementation
@override
Map<String, Object?> toDocument() {
final List<Map<String?, dynamic>>? memberMediaListMap = memberMedia != null
? memberMedia!.map((item) => item.toDocument()).toList()
: null;
Map<String, Object?> theDocument = HashMap();
if (authorId != null) {
theDocument["authorId"] = authorId;
} else {
theDocument["authorId"] = null;
}
theDocument["timestamp"] = timestamp;
if (appId != null) {
theDocument["appId"] = appId;
} else {
theDocument["appId"] = null;
}
if (feedId != null) {
theDocument["feedId"] = feedId;
} else {
theDocument["feedId"] = null;
}
if (postAppId != null) {
theDocument["postAppId"] = postAppId;
} else {
theDocument["postAppId"] = null;
}
if (postPageId != null) {
theDocument["postPageId"] = postPageId;
} else {
theDocument["postPageId"] = null;
}
theDocument['pageParameters'] = pageParameters;
if (html != null) {
theDocument["html"] = html;
} else {
theDocument["html"] = null;
}
if (description != null) {
theDocument["description"] = description;
} else {
theDocument["description"] = null;
}
if (likes != null) {
theDocument["likes"] = likes;
} else {
theDocument["likes"] = null;
}
if (dislikes != null) {
theDocument["dislikes"] = dislikes;
} else {
theDocument["dislikes"] = null;
}
if (accessibleByGroup != null) {
theDocument["accessibleByGroup"] = accessibleByGroup;
} else {
theDocument["accessibleByGroup"] = null;
}
if (accessibleByMembers != null) {
theDocument["accessibleByMembers"] = accessibleByMembers!.toList();
} else {
theDocument["accessibleByMembers"] = null;
}
if (readAccess != null) {
theDocument["readAccess"] = readAccess!.toList();
} else {
theDocument["readAccess"] = null;
}
if (archived != null) {
theDocument["archived"] = archived;
} else {
theDocument["archived"] = null;
}
if (externalLink != null) {
theDocument["externalLink"] = externalLink;
} else {
theDocument["externalLink"] = null;
}
if (memberMedia != null) {
theDocument["memberMedia"] = memberMediaListMap;
} else {
theDocument["memberMedia"] = null;
}
return theDocument;
}