toMap method
Implementation
Map<String, dynamic> toMap() {
return {
'revenue': revenue,
if (currency != null) 'currency': currency,
if (eventName != null) 'eventName': eventName,
if (productId != null) 'productId': productId,
if (transactionId != null) 'transactionId': transactionId,
if (metadata != null) 'metadata': metadata,
};
}