getConversationList static method

Future<List?> getConversationList(
  1. List<int> conversationTypeList
)

根据传入的会话类型来获取会话列表

conversationTypeList 会话类型数组,参见枚举 RCConversationType

Implementation

static Future<List? /*Conversation*/ > getConversationList(List<int /*RCConversationType*/ > conversationTypeList) async {
  Map map = {"conversationTypeList": conversationTypeList};
  List? list = await _channel.invokeMethod(RCMethodKey.GetConversationList, map);
  if (list == null) {
    return [];
  }
  List conList = [];
  for (String conStr in list) {
    Conversation? con = MessageFactory.instance!.string2Conversation(conStr);
    conList.add(con);
  }
  return conList;
}