GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionPlacePrediction.fromJson constructor

GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionPlacePrediction.fromJson(
  1. Map json_
)

Implementation

GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionPlacePrediction.fromJson(
    core.Map json_)
    : this(
        distanceMeters: json_.containsKey('distanceMeters')
            ? json_['distanceMeters'] as core.int
            : null,
        place:
            json_.containsKey('place') ? json_['place'] as core.String : null,
        placeId: json_.containsKey('placeId')
            ? json_['placeId'] as core.String
            : null,
        structuredFormat: json_.containsKey('structuredFormat')
            ? GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStructuredFormat
                .fromJson(json_['structuredFormat']
                    as core.Map<core.String, core.dynamic>)
            : null,
        text: json_.containsKey('text')
            ? GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText
                .fromJson(
                    json_['text'] as core.Map<core.String, core.dynamic>)
            : null,
        types: json_.containsKey('types')
            ? (json_['types'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
      );