Get Conversation
LikeMinds Flutter Chat SDK offers this feature which enables you to access and analyze individual conversations, empowering you to implement customized functionalities or perform specific operations within your chat application.
Steps to Get a Single Conversation
- Create an object of the
GetSingleConversationRequest
class using theGetSingleConversationRequestBuilder
class and specify the conversation ID. - For getting a single conversation call
getSingleConversation()
present inLMChatClient
class using your request object. - Process the response (
LMResponse<GetSingleConversationResponse>
) as per your requirement.
GetSingleConversationRequest request = (GetSingleConversationRequestBuilder()
..conversationId(273099))
.build();
LMResponse<GetSingleConversationResponse> response =
await lmChatClient.getSingleConversation(request);
if (response.success) {
// your function to process the response data
processResponse(response);
} else {
// your function to process error message
processError(response);
}
Models
GetSingleConversationRequest
List of parameters for the GetSingleConversationRequest
class
Variable | Type | Description | Optional |
---|---|---|---|
conversationId | int | Conversation Id | |
chatroomId | int | Chatroom Id |
GetSingleConversationResponse
List of parameters for the GetSingleConversationResponse
class
Variable | Type | Description | Optional |
---|---|---|---|
success | bool | API success status | |
errorMessage | String? | Error message in case of failure | ✔️ |
conversation | Conversation? | Conversation object | ✔️ |