toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final Map<String, dynamic> data = new Map<String, dynamic>();
  data['roomId'] = roomId;
  data.putIfNotNull("name", name);
  data.putIfNotNull("desc", description);
  data.putIfNotNull("owner", owner);
  data.putIfNotNull("memberCount", memberCount);
  data.putIfNotNull("maxUsers", maxUsers);
  data.putIfNotNull("adminList", adminList);
  data.putIfNotNull("memberList", memberList);
  data.putIfNotNull("blockList", blockList);
  data.putIfNotNull("muteList", muteList);
  data.putIfNotNull("announcement", announcement);
  data.putIfNotNull("isAllMemberMuted", isAllMemberMuted);
  data['permissionType'] = chatRoomPermissionTypeToInt(permissionType);

  return data;
}