GooglePlacesService class

Properties

hashCode int
The hash code for this object.
no setterinherited
isInitialized bool
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

generateSessionToken() String
Generate a new session token for billing optimization
getAutocompletePredictions({required String query, String? sessionToken, String? country, List<String> types = const []}) Future<List<PlacePrediction>>
Search for places using autocomplete
getPlaceDetails({required String placeId, String? sessionToken, List<String> fields = const ['place_id', 'formatted_address', 'geometry/location', 'address_components']}) Future<LocationResult?>
Get place details by place ID
initialize(String apiKey) → void
Initialize the service with your Google Places API key
nearbySearch({required double latitude, required double longitude, double radius = 5000, String? type, String? keyword}) Future<List<LocationResult>>
Search for nearby places
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
textSearch({required String query, String? region}) Future<List<LocationResult>>
Text search for places
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

instance GooglePlacesService
no setter