getConversationsFromServer method

Future<List<EMConversation>> getConversationsFromServer()

从服务器获取会话

Implementation

Future<List<EMConversation>> getConversationsFromServer() async {
  Map result =
      await _channel.invokeMethod(EMSDKMethod.getConversationsFromServer);
  EMError.hasErrorFromResult(result);
  List<EMConversation> conversationList = [];
  result[EMSDKMethod.getConversationsFromServer]?.forEach((element) {
    conversationList.add(EMConversation.fromJson(element));
  });
  return conversationList;
}