SDKsFlutterEnterprise
Create a conversation group
Create a conversation group with the OpenIM Flutter SDK.
Use createConversationGroup() to create a conversation group for the current user. CreateConversationGroupReq.groupName is required; all other fields are optional.
Parameters
| Field | Description |
|---|---|
groupName | Group name. It is serialized to the SDK as name. |
order | Optional order value. Define the sort direction consistently in the product. |
ex | Optional application extension string. |
conversationID | Optional conversation to add to the new group immediately. |
conversationGroupType | Defaults 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.
Was this page helpful?