Browse SDKs · Flutter
Platform
SDKsFlutter

Get conversations by ID

Batch query conversations by conversationID using the OpenIM Flutter SDK.

Copy

Retrieve full conversation details for a known collection of conversation IDs:

Parameters

ParameterTypeRequiredDescription
conversationIDListList<String>YesList of target conversation IDs to query.

Code example

final conversations = await OpenIM.iMManager.conversationManager
    .getMultipleConversation(conversationIDList: conversationIDs);

final byID = {
  for (final item in conversations) item.conversationID: item,
};

Return value

A successful Future returns a list of matching ConversationInfo objects (List<ConversationInfo>). If certain IDs do not exist locally, they will be omitted from the result list; do not assume a 1:1 positional correspondence between the input arguments and output items.

This query returns an immediate data snapshot and does not emit event notifications. For subsequent real-time updates, see Retrieve conversation list.