getUnreadCountConversationTypeList static method

Future<void> getUnreadCountConversationTypeList(
  1. List<int> conversationTypeList,
  2. bool isContain,
  3. dynamic finished(
    1. int? count,
    2. int? code
    )?
)

批量获取特定某些会话的未读数

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

isContain 是否包含免打扰会话

finished 回调结果,code 为 0 代表正常

Implementation

static Future<void> getUnreadCountConversationTypeList(List<int> conversationTypeList, bool isContain, Function(int? count, int? code)? finished) async {
  Map map = {"conversationTypeList": conversationTypeList, "isContain": isContain};
  Map? unreadMap = await _channel.invokeMethod(RCMethodKey.GetUnreadCountConversationTypeList, map);
  if (finished != null) {
    finished(unreadMap!["count"], unreadMap["code"]);
  }
}