getMessageUnreceiptCount method

Future<int> getMessageUnreceiptCount ({@required dynamic target, @required String msgId })

Implementation

Future<int> getMessageUnreceiptCount({
  @required dynamic target, /// (JMSingle | JMGroup)
  @required String msgId,
}) async {
  print(flutter_log + "getMessageUnreceiptCount" + " msgid = $msgId");

  if (msgId == null || msgId.length == 0 || target == null) {
    return 0;
  }

  Map param = target.toJson();
  param["id"] = msgId;

  int count = await _channel.invokeMethod('getMessageUnreceiptCount', param..removeWhere((key,value) => value == null));
  return count;
}