toJson method
Implementation
Map<String, dynamic> toJson() {
List<dynamic> floorList = [];
for (var element in floors) {
floorList.add(element.toJson());
}
return {
'key': key,
'location': location.toJson(),
'floors': floorList,
'area': area.toJson()
};
}