IAVenue.fromMap constructor

IAVenue.fromMap(
  1. Map map
)

Implementation

IAVenue.fromMap(Map map)
    : id = map['id'],
      name = map['name'] {
  List<IAFloorplan> plans = [];
  if (map.containsKey('floorPlans')) {
    for (var plan in map['floorPlans']) {
      plans.add(IAFloorplan.fromMap(plan));
    }
  }
  floorplans = plans;
  List<IAGeofence> fences = [];
  if (map.containsKey('geofences')) {
    for (var fence in map['geofences']) {
      fences.add(IAGeofence.fromGeoJson(fence));
    }
  }
  geofences = fences;
  List<IAPOI> pois = [];
  if (map.containsKey('pois')) {
    for (var poi in map['pois']) {
      pois.add(IAPOI.fromGeoJson(poi));
    }
  }
  this.pois = pois;
}