logPurchase method
void
logPurchase(})
Logs a purchase event to Braze.
Implementation
void logPurchase(
String productId, String currencyCode, double price, int quantity,
{Map<String, dynamic>? properties}) {
final Map<String, dynamic> params = <String, dynamic>{
"productId": productId,
"currencyCode": currencyCode,
"price": price,
"quantity": quantity,
};
if (properties != null) {
// Omits entry when properties is null
params["properties"] = properties;
}
_channel.invokeMethod('logPurchase', params);
}