toLogString method
Implementation
String toLogString() {
String markListBinary = '';
if (markList != null) {
markListBinary = markList!.map((mark) {
if (mark == null) return 'null';
// 将64位整数转换为二进制字符串,不补前导0
return mark.toUnsigned(64).toRadixString(2);
}).join(', ');
}
String res =
"conversationID:$conversationID|type:$type|userID:$userID|groupID:$groupID|showName:$showName|groupType:$groupType|unreadCount:$unreadCount|isPinned:$isPinned|recvOpt:$recvOpt|customData:$customData|c2cReadTimestamp:$c2cReadTimestamp|groupReadSequence:$groupReadSequence|markList: $markListBinary|lastMessage:${lastMessage?.msgID}";
return res;
}