Browse SDKs · Flutter
SDKsFlutterEnterprise

Create a conversation group

Create a conversation group with the OpenIM Flutter SDK.

Copy

Use createConversationGroup() to create a conversation group for the current user. CreateConversationGroupReq.groupName is required; all other fields are optional.

Parameters

FieldDescription
groupNameGroup name. It is serialized to the SDK as name.
orderOptional order value. Define the sort direction consistently in the product.
exOptional application extension string.
conversationIDOptional conversation to add to the new group immediately.
conversationGroupTypeDefaults to ConversationGroupType.custom.
final group = await OpenIM.iMManager.conversationGroupManager
    .createConversationGroup(
  req: CreateConversationGroupReq(
    groupName: 'Work',
    order: 100,
    conversationID: conversationID,
    conversationGroupType: ConversationGroupType.custom,
  ),
);

Result

The successful Future returns ConversationGroupInfo. Merge the new group by its nullable conversationGroupID after checking that the ID is present.

Other logged-in clients or subsequent synchronization may receive onConversationGroupAdded. For the complete listener, see Conversation groups overview.