Browse SDKs · Flutter
Platform
SDKsFlutterEnterprise

Create a conversation group

Create a custom conversation group to categorize conversation lists using the OpenIM Flutter SDK.

Copy

Create a conversation group for the currently signed-in user to organize related conversations by business categories:

Parameters

ParameterTypeRequiredDescription
groupNameStringYesName of the conversation group.
orderint?NoSorting sequence value. Ordering conventions are defined by the application layer.
exString?NoCustom business extension string.
conversationIDString?NoFirst conversation ID to associate immediately upon group creation.
conversationGroupTypeConversationGroupType?NoGroup type; defaults to ConversationGroupType.custom.

Code example

final group = await OpenIM.iMManager.conversationGroupManager
    .createConversationGroup(
  req: CreateConversationGroupReq(
    groupName: 'Work',
    order: 100,
    conversationID: conversationID,
    conversationGroupType: ConversationGroupType.custom,
  ),
);

Return value

A successful Future returns the newly created ConversationGroupInfo object. The client uses conversationGroupID as the merge key to update the local group list.

State changes after the call

Multi-device synchronization and arriving changes trigger onConversationGroupAdded notifications. For complete listener integration, see Conversation groups overview.