setMessageHaveRead method

Future<bool> setMessageHaveRead (
  1. {@required dynamic target,
  2. @required String msgId}
)

Implementation

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

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

  Map param = target.toJson();
  param["id"] = msgId;
  bool isSuccess = await _channel.invokeMethod('setMessageHaveRead', param..removeWhere((key,value) => value == null));

  return isSuccess;
}