markMessageAsRead static method
设置聊天记录为已读,此为 markC2CMessageAsRead 和 markGroupMessageAsRead 的封装
userID
用户ID
groupID
群ID
Implementation
static markMessageAsRead({
String? userID,
String? groupID,
}) {
if (userID == null && groupID == null)
throw ArgumentError("userID 和 groupID 不能同时为空!");
if (userID != null) {
return markC2CMessageAsRead(userID: userID);
} else {
return markGroupMessageAsRead(groupID: groupID!);
}
}