Room.fromJson constructor
Creates a new instance of Room from a JSON object.
The JSON object should contain keys that correspond to the properties of Room.
Implementation
factory Room.fromJson(Map<String, dynamic> json) {
return Room(
id: json['id'],
emailAddress: json['emailAddress'],
displayName: json['displayName'],
address:
json['address'] != null ? Address.fromJson(json['address']) : null,
geoCoordinates: json['geoCoordinates'] != null
? GeoCoordinates.fromJson(json['geoCoordinates'])
: null,
phone: json['phone'],
nickname: json['nickname'],
label: json['label'],
capacity: json['capacity'],
building: json['building'],
floorNumber: json['floorNumber'],
isManaged: json['isManaged'],
isWheelChairAccessible: json['isWheelChairAccessible'],
bookingType: json['bookingType'],
tags: json['tags'] != null ? List<String>.from(json['tags']) : null,
audioDeviceName: json['audioDeviceName'],
videoDeviceName: json['videoDeviceName'],
displayDevice: json['displayDevice'],
);
}