AutocompletePrediction class

Represents an autocomplete suggestion of a place, based on a particular text query.

An AutocompletePrediction includes the description of the suggested place as well as basic details including place ID and types.

Ref: https://developers.google.com/maps/documentation/places/android-sdk/reference/com/google/android/libraries/places/api/model/AutocompletePrediction

Annotations
  • @freezed

Constructors

AutocompletePrediction({required int? distanceMeters, required String placeId, List<PlaceType>? placeTypes, required String primaryText, required String secondaryText, required String fullText})
Constructs an AutocompletePrediction object.
const
factory
AutocompletePrediction.fromJson(Map<String, Object?> json)
Parse an AutocompletePrediction from json.
factory

Properties

copyWith → $AutocompletePredictionCopyWith<AutocompletePrediction>
no setterinherited
distanceMeters int?
the straight-line distance between the place being referred to by getPlaceId() and the origin specified in the request.
no setterinherited
fullText String
The full text of a place.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
placeId String
the place ID of the place being referred to by this prediction.
no setterinherited
placeTypes List<PlaceType>?
the list of place types associated with the place referred to by getPlaceId()
no setterinherited
primaryText String
the primary text of a place.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
secondaryText String
the secondary text of a place.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited