Chat.fromJSON constructor

Chat.fromJSON(
  1. Map<String, dynamic> json
)

Implementation

Chat.fromJSON(Map<String, dynamic> json)
    : id = json['id'],
      title = json['title'],
      avatarUrl = json['avatarUrl'],
      createdAt = json['createdAt'],
      updatedAt = json['updatedAt'],
      membersCount = json['membersCount'],
      lastMessage = json['lastMessage'] == null
          ? null
          : ChatMessage.fromJSON(json['lastMessage']),
      otherMember = User.fromJSON(json['otherMember']);