setGroup method

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

Set the group this user belongs to.

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

Implementation

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