trackWithGroups method Null safety
Track an event with specific groups.
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. Group key/value pairs are upserted into the property map before tracking.
eventNameThe name of the event to sendpropertiesA Map containing the key value pairs of the properties to include in this event.groupsA Map containing the group key value pairs for this event.
Implementation
void trackWithGroups(String eventName, Map<String, dynamic> properties,
Map<String, dynamic> groups) {
if (_MixpanelHelper.isValidString(eventName)) {
_channel.invokeMethod<void>('trackWithGroups', <String, dynamic>{
'eventName': eventName,
'properties': properties,
'groups': groups
});
} else {
developer.log('`trackWithGroups` failed: eventName cannot be blank',
name: 'Mixpanel');
}
}