EMGroupOptions constructor Null safety

EMGroupOptions(
  1. {EMGroupStyle style = EMGroupStyle.PrivateOnlyOwnerInvite,
  2. int count = 200,
  3. bool inviteNeedConfirm = false,
  4. String? extension}
)

Sets the group options.

Param style The group style: {EMGroupStyle}.

Param count The maximum number of members in a group. The default value is 200.

Param inviteNeedConfirm Whether you can automatically add a user to the chat group depends on the settings of {GroupOptions#inviteNeedConfirm} and {EMOptions#autoAcceptGroupInvitation}.

  • If inviteNeedConfirm is set to false, you can add the invitee directly to the chat group, regardless of the settings of EMOptions#autoAcceptGroupInvitation.
  • If inviteNeedConfirm is set to true, whether the invitee automatically joins the chat group or not depends on the settings of {@link EMOptions#autoAcceptGroupInvitation(boolean)} on the invitee's client.
    • If autoAcceptGroupInvitation is set to true, the invitee automatically joins the chat group.
    • If autoAcceptGroupInvitation is set to false, the invitee does not join the chat group until this invitee approves the group invitation.

Param extension Group detail extensions which can be in the JSON format to contain more group information.

Implementation

EMGroupOptions({
  EMGroupStyle style = EMGroupStyle.PrivateOnlyOwnerInvite,
  int count = 200,
  bool inviteNeedConfirm = false,
  String? extension,
}) {
  _style = style;
  _maxCount = count;
  _inviteNeedConfirm = inviteNeedConfirm;
  _ext = extension;
}