toDocument method
Implementation
@override
Map<String, Object?> toDocument() {
Map<String, Object?> theDocument = HashMap();
if (authorId != null) {
theDocument["authorId"] = authorId;
} else {
theDocument["authorId"] = null;
}
if (appId != null) {
theDocument["appId"] = appId;
} else {
theDocument["appId"] = null;
}
if (roomId != null) {
theDocument["roomId"] = roomId;
} else {
theDocument["roomId"] = null;
}
theDocument["timestamp"] = timestamp;
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;
}
return theDocument;
}