getThreadConversation method
- String threadId
Gets the thread conversation by thread ID.
Param threadId
The thread ID.
Return The conversation object.
Throws A description of the exception. See ChatError.
Implementation
Future<ChatConversation> getThreadConversation(String threadId) async {
Map result = await ChatChannel.invokeMethod(
ChatMethodKeys.getThreadConversation,
{"convId", threadId},
);
try {
ChatError.hasErrorFromResult(result);
return ChatConversation.fromJson(
result[ChatMethodKeys.getThreadConversation]);
} on ChatError catch (e) {
throw e;
}
}