PlaceAutocompletePrediction.fromMap constructor
PlaceAutocompletePrediction.fromMap(
- Map<String, dynamic> map
)
Implementation
factory PlaceAutocompletePrediction.fromMap(Map<String, dynamic> map) {
return PlaceAutocompletePrediction(
description: map['description'] as String,
matchedSubstrings: parsePlaceAutocompleteMatchedSubstringArray(
map['matched_substrings'])!,
structuredFormatting: PlaceAutocompleteStructuredFormat.fromMap(
map['structured_formatting']),
terms: parsePlaceAutocompleteTerm(map['terms'])!,
distanceMeters: map['distance_meters'],
placeId: map['place_id'],
types: map['types']?.cast<String>(),
);
}