track method
Track an event.
Every call to track eventually results in a data point sent to Mixpanel. These data points are what are measured, counted, and broken down to create your Mixpanel reports. Events have a string name, and an optional set of name/value pairs that describe the properties of that event.
eventName
The name of the event to sendproperties
An optional map containing the key value pairs of the properties to include in this event.
Implementation
Future<void> track(
String eventName, {
Map<String, dynamic>? properties,
}) async {
if (_MixpanelHelper.isValidString(eventName)) {
await _channel.invokeMethod<void>('track',
<String, dynamic>{'eventName': eventName, 'properties': properties});
} else {
developer.log('`track` failed: eventName cannot be blank',
name: 'Mixpanel');
}
}