google_places_search_field 1.0.0 copy "google_places_search_field: ^1.0.0" to clipboard
google_places_search_field: ^1.0.0 copied to clipboard

A customizable Flutter widget for searching locations using Google Places Autocomplete with LatLng callback support

A Flutter widget that integrates with the flutter_google_places_sdk and google_maps_flutter to provide a search input field with Google Places autocomplete and LatLng callback support. Ideal for apps that need smooth location search functionality.

Features #

  • Google Places autocomplete integration
  • Real-time search with debouncing
  • Customizable input decoration and text style
  • Easy retrieval of selected location's coordinates (LatLng)
  • Clean overlay UI with search suggestions

Getting started #

  1. Add your Google Maps API key with Places API enabled.
  2. Make sure the following packages are added in your pubspec.yaml:
    • flutter_google_places_sdk
    • google_maps_flutter
  3. Set up billing and permissions for the Google Maps SDK on Android/iOS.

Usage #

GooglePlacesSearchField(
  apiKey: 'YOUR_GOOGLE_API_KEY',
  onLatLngSelected: (LatLng latLng) {
    print('Selected location: ${latLng.latitude}, ${latLng.longitude}');
  },
  hintText: 'Search for a place',
);
1
likes
0
points
29
downloads

Publisher

verified publisherpranavk.com

Weekly Downloads

A customizable Flutter widget for searching locations using Google Places Autocomplete with LatLng callback support

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, flutter_google_places_sdk, google_maps_flutter

More

Packages that depend on google_places_search_field