fromMessage static method

TopicDescription fromMessage(
  1. Map<String, dynamic> msg
)

Create a new instance from received message

Implementation

static TopicDescription fromMessage(Map<String, dynamic> msg) {
  return TopicDescription(
    created: msg['created'] != null ? DateTime.parse(msg['created']) : DateTime.now(),
    updated: msg['updated'] != null ? DateTime.parse(msg['updated']) : DateTime.now(),
    acs: msg['acs'] != null ? AccessMode(msg['acs']) : null,
    public: msg['public'],
    private: msg['private'],
    status: msg['status'],
    defacs: msg['defacs'] != null ? DefAcs.fromMessage(msg['defacs']) : null,
    seq: msg['seq'],
    read: msg['read'],
    recv: msg['recv'],
    clear: msg['clear'],
    noForwarding: msg['noForwarding'],
    touched: msg['touched'],
  );
}