createGroup method

Future<Group> createGroup({
  1. required String groupName,
  2. String? desc,
  3. List<String>? inviteMembers,
  4. String? inviteReason,
  5. required GroupOptions options,
})

Implementation

Future<Group> createGroup({
  required String groupName,
  String? desc,
  List<String>? inviteMembers,
  String? inviteReason,
  required GroupOptions options,
}) {
  return checkResult(ChatSDKEvent.createGroup, () async {
    Group group = await Client.getInstance.groupManager.createGroup(
      groupName: groupName,
      desc: desc,
      inviteMembers: inviteMembers,
      inviteReason: inviteReason,
      options: options,
    );

    onGroupCreatedByMyself(group);

    return group;
  });
}