fetchChatThread method
- {required String chatThreadId}
Get Chat Thread details from server.
Param chatThreadId
Chat Thread ID.
Return The chat thread object.
Throws A description of the exception. See ChatError.
Implementation
Future<ChatThread?> fetchChatThread({
required String chatThreadId,
}) async {
Map req = {"threadId": chatThreadId};
Map result = await _channel.invokeMethod(
ChatMethodKeys.fetchChatThreadDetail,
req,
);
try {
ChatError.hasErrorFromResult(result);
return ChatThread.fromJson(result[ChatMethodKeys.fetchChatThreadDetail]);
} on ChatError catch (e) {
throw e;
}
}