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