toJson method

Map<String, dynamic> toJson()

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()
  };
}