GooglePlacesService class
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