Site.fromMap constructor
Site.fromMap(
- Map map
Implementation
factory Site.fromMap(Map<dynamic, dynamic> map) {
return Site(
address:
map['address'] == null ? null : AddressDetail.fromMap(map['address']),
distance: map['distance']?.toDouble(),
formatAddress: map['formatAddress'],
location:
map['location'] != null ? Coordinate.fromMap(map['location']) : null,
name: map['name'],
poi: map['poi'] != null ? Poi.fromMap(map['poi']) : null,
siteId: map['siteId'],
viewport: map['viewport'] != null
? CoordinateBounds.fromMap(map['viewport'])
: null,
prediction: map['prediction'] != null
? AutoCompletePrediction.fromMap(map['prediction'])
: null,
utcOffset: map['utcOffset'],
);
}