addGroup method

void addGroup (
  1. String groupKey,
  2. dynamic groupID
)

Add a group to this user's membership for a particular group key

  • groupKey The property name associated with this group type (must already have been set up).
  • groupID The new group the user belongs to.

Implementation

void addGroup(String groupKey, dynamic groupID) {
  if (_MixpanelHelper.isValidString(groupKey)) {
    _channel.invokeMethod<void>('addGroup',
        <String, dynamic>{'groupKey': groupKey, 'groupID': groupID});
  } else {
    developer.log('`addGroup` failed: groupKey cannot be blank',
        name: 'Mixpanel');
  }
}