SystemMessage constructor
SystemMessage({})
Implementation
SystemMessage(
{this.messageId,
this.type,
this.fromAccount,
this.targetId,
this.time,
this.status,
this.content,
this.attach,
this.attachObject,
this.unread,
this.customInfo}) {
if (attach != null) {
switch (type) {
case SystemMessageType.addFriend:
final Map<String, dynamic> attachMap = JsonDecoder().convert(attach!);
int verifyType = attachMap['vt'];
Map<String, dynamic>? exMap = attachMap['serverex'];
String? ext;
if (exMap != null) {
ext = exMap['0'] == 1 ? exMap['1'] : null;
}
attachObject = AddFriendNotify(
fromAccount, getEventFromInt(verifyType),
msg: content, serverExt: ext);
break;
default:
break;
}
}
}