customXMark method
标记自定义数据,no
为数据集合分类序号,score
为null时存在对应标记则删除否则添加,score
不为null时会将Cusmark.score字段设置为score
body1
为false时返回数据不包含CustomX.body1字段,body2
为false时返回数据不包含CustomX.body2字段,body3
为false时返回数据不包含CustomX.body3字段
Implementation
Future<EasyPacket<CustomX>> customXMark({required int no, required ObjectId id, double? score, bool body1 = false, bool body2 = false, bool body3 = false}) async {
final response = await _aliveClient.websocketRequest('customXMark', data: {'bsid': bsid, 'no': no, 'id': id, 'score': score, 'body1': body1, 'body2': body2, 'body3': body3});
if (response.ok) {
return response.cloneExtra(
CustomX.fromJson(response.data!['customx'])
..cusmark = response.data!['cusmark'] == null ? null : Cusmark.fromJson(response.data!['cusmark'])
..cusstar = response.data!['cusstar'] == null ? null : Cusstar.fromJson(response.data!['cusstar']),
);
} else {
return response.cloneExtra(null);
}
}