groupAckCount method

Future<int> groupAckCount()

~english Gets the number of members that have read the group message.

Return group ack count

Throws A description of the exception. See EMError ~end

~chinese 获取群消息已读人数。

Return 群消息已读人数。

Throws 如果有方法调用的异常会在这里抛出,可以看到具体错误原因。请参见 EMError。 ~end

Implementation

Future<int> groupAckCount() async {
  Map req = {"msgId": msgId};
  Map result =
      await _emMessageChannel.invokeMethod(ChatMethodKeys.groupAckCount, req);
  try {
    EMError.hasErrorFromResult(result);
    if (result.containsKey(ChatMethodKeys.groupAckCount)) {
      return result[ChatMethodKeys.groupAckCount];
    } else {
      return 0;
    }
  } on EMError catch (e) {
    throw e;
  }
}