toDocument method
Implementation
@override
Map<String, Object?> toDocument() {
final Map<String, dynamic>? itemImageBackgroundMap =
itemImageBackground != null ? itemImageBackground!.toDocument() : null;
final Map<String, dynamic>? itemDetailBackgroundMap =
itemDetailBackground != null
? itemDetailBackground!.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 (description != null) {
theDocument["description"] = description;
} else {
theDocument["description"] = null;
}
if (shopId != null) {
theDocument["shopId"] = shopId;
} else {
theDocument["shopId"] = null;
}
if (itemImageBackground != null) {
theDocument["itemImageBackground"] = itemImageBackgroundMap;
} else {
theDocument["itemImageBackground"] = null;
}
if (itemDetailBackground != null) {
theDocument["itemDetailBackground"] = itemDetailBackgroundMap;
} else {
theDocument["itemDetailBackground"] = null;
}
if (conditions != null) {
theDocument["conditions"] = conditionsMap;
} else {
theDocument["conditions"] = null;
}
return theDocument;
}