getUnreadMsgCount method

Future<int> getUnreadMsgCount ()

获取此对话中未读取的消息数量.

Implementation

Future<int> getUnreadMsgCount() async {
  Map<String, dynamic> result = await _emConversationChannel
      .invokeMethod(EMSDKMethod.getUnreadMsgCount, {"id": _conversationId});
  if (result['success']) {
    return result['count'];
  }
  return -1; //-1 means error/unknown
}