ChatRoom.fromJson constructor
ChatRoom.fromJson( - Map<String, dynamic> map
)
Implementation
factory ChatRoom.fromJson(Map<String, dynamic> map) {
return ChatRoom._private(
roomId: map["roomId"],
name: map["name"],
description: map["desc"],
owner: map["owner"],
memberCount: map["memberCount"],
maxUsers: map["maxUsers"],
adminList: map.getList("adminList"),
memberList: map.getList("memberList"),
blockList: map.getList("blockList"),
muteList: map.getList("muteList"),
announcement: map["announcement"],
permissionType: ChatRoomPermissionType.values[map["permissionType"]],
isAllMemberMuted: map.boolValue("isAllMemberMuted"),
createTimestamp: map["createTimestamp"],
isInWhitelist: map.boolValue("isInWhitelist"),
muteExpireTimestamp: map["muteExpireTimestamp"],
);
}