trackCharge method Null safety
Track a revenue transaction for the identified people profile.
amountthe amount of money exchanged. Positive amounts represent purchases or income from the customer, negative amounts represent refunds or payments to the customer.propertiesan optional collection of properties to associate with this transaction.
Implementation
void trackCharge(double amount, {Map<String, dynamic>? properties}) {
// ignore: unnecessary_null_comparison
if (amount != null) {
_channel.invokeMethod<void>('trackCharge', <String, dynamic>{
'token': this._token,
'amount': amount,
'properties': properties
});
} else {
developer.log('`people trackCharge` failed: amount cannot be blank',
name: 'Mixpanel');
}
}