toMap method
Implementation
Map<String, dynamic> toMap() {
return {
'name': 'CHECKOUT', // CHECKOUT is required
'step': getCheckoutStep(step),
'totalPrice': totalPrice,
'productList': productList.map((product) => product.toMap()).toList(),
if (orderNo != null && orderNo != '') 'orderNo': orderNo,
if (currency != null) 'currency': getCurrencyType(currency!),
'sessionId': sessionId,
'userId': userId,
'device': device,
'os': os,
'lang': lang,
};
}