fromMessage static method
Implementation
static MetaMessage fromMessage(Map<String, dynamic> msg) {
List<dynamic> sub = msg['sub'];
return MetaMessage(
id: msg['id'],
topic: msg['topic'],
ts: msg['ts'],
desc: msg['desc'] != null ? TopicDescription.fromMessage(msg['desc']) : null,
sub: sub != null && sub.length != null ? sub.map((sub) => TopicSubscription.fromMessage(sub)).toList() : [],
tags: msg['tags'],
cred: msg['cred'] != null && msg['cred'].length != null
? msg['cred'].map((Map<String, dynamic> cred) => Credential.fromMessage(cred)).toList()
: [],
del: msg['del'] != null ? DeleteTransaction.fromMessage(msg['del']) : null,
);
}