PurchaseEvent constructor
Implementation
PurchaseEvent(String name, double price, String currency, { String? customString }) {
this.name = name;
this.price = price;
assert(currency.length == 3, "Invalid ISO 4217 currency");
_currency = currency.codeUnitAt(0) | (currency.codeUnitAt(1) << 8) | (currency.codeUnitAt(2) << 16);
this.customString = customString;
}