Poi.fromMap constructor

Poi.fromMap(
  1. Map map
)

Implementation

factory Poi.fromMap(Map<dynamic, dynamic> map) {
  return Poi(
    internationalPhone: map['internationalPhone'],
    openingHours: map['openingHours'] != null
        ? OpeningHours.fromMap(map['openingHours'])
        : null,
    phone: map['phone'],
    photoUrls: map['photoUrls'] != null
        ? List<String>.from(map['photoUrls'].map((dynamic x) => x))
        : null,
    poiTypes: map['poiTypes'] != null
        ? List<String>.from(map['poiTypes'].map((dynamic x) => x))
        : null,
    hwPoiTypes: map['hwPoiTypes'] != null
        ? List<String>.from(map['hwPoiTypes'].map((dynamic x) => x))
        : null,
    rating: map['rating']?.toDouble(),
    websiteUrl: map['websiteUrl'],
    priceLevel: map['priceLevel'],
    businessStatus: map['businessStatus'],
    childrenNodes: map['childrenNodes'] != null
        ? List<ChildrenNode>.from(
            map['childrenNodes'].map(
              (dynamic x) => ChildrenNode.fromMap(x),
            ),
          )
        : null,
    icon: map['icon'],
  );
}