toDocument method
Implementation
@override
Map<String, Object?> toDocument() {
final List<Map<String?, dynamic>>? albumEntriesListMap =
albumEntries != null
? albumEntries!.map((item) => item.toDocument()).toList()
: null;
final Map<String, dynamic>? backgroundImageMap =
backgroundImage != null ? backgroundImage!.toDocument() : null;
final Map<String, dynamic>? conditionsMap =
conditions != null ? conditions!.toDocument() : null;
Map<String, Object?> theDocument = HashMap();
if (appId != null) {
theDocument["appId"] = appId;
} else {
theDocument["appId"] = null;
}
if (albumEntries != null) {
theDocument["albumEntries"] = albumEntriesListMap;
} else {
theDocument["albumEntries"] = null;
}
if (description != null) {
theDocument["description"] = description;
} else {
theDocument["description"] = null;
}
if (backgroundImage != null) {
theDocument["backgroundImage"] = backgroundImageMap;
} else {
theDocument["backgroundImage"] = null;
}
if (conditions != null) {
theDocument["conditions"] = conditionsMap;
} else {
theDocument["conditions"] = null;
}
return theDocument;
}