google_places_autocomplete_text_field
4.2.0, released 3 months ago by gowdysoftware.de
A fully customizable Google Places autocomplete TextFormField for Flutter applications.
What it does
Provides a customized Flutter TextFormField widget that displays address and location autocomplete suggestions directly from the Google Places API. It handles debouncing, API key configuration, country restrictions, and fetching optional place details and coordinates.
AI-written summary of version 4.2.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need an address search input field powered by Google Places
- You require customizable UI suggestions within a standard text form field
Skip it when
- You are not using the Google Places API
- You need offline place searching
Strengths
- Integrates seamlessly with forms using a standard TextFormField
- Supports web configuration via proxy URL to avoid CORS errors
- Allows retrieving lat/lng coordinates and address components directly from predictions
Weaknesses
- Requires a valid Google Places API key and active network connection
- Web platform usage requires a custom proxy URL to handle CORS
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 3
Requires a Google Places API key. For web builds, a proxy URL must be configured to bypass CORS errors.
GooglePlacesAutoCompleteTextFormField(
textEditingController: controller,
config: const GoogleApiConfig(
apiKey: 'YOUR_GOOGLE_API_KEY',
debounceTime: 400,
),
onSuggestionClicked: (prediction) {
controller.text = prediction.description;
},
)Alternatives
Packages that do the same job and could replace google_places_autocomplete_text_field.
- google_maps_flutter_web
Web platform implementation of google_maps_flutter.
88Compare - google_maps_flutter_android
Android implementation of the google_maps_flutter plugin.
82Compare - google_maps_flutter_ios
iOS implementation of the google_maps_flutter plugin.
81Compare - map_location_picker
Google Maps location picker for Flutter with Places API search and typed addresses.
76Compare
Works with
Packages commonly used together with google_places_autocomplete_text_field: ones it builds on, ones built on it, and its own family.
- asyncgoogle_places_autocomplete_text_field depends on itUtility classes and helpers that extend Dart's async library.
- rxdartgoogle_places_autocomplete_text_field depends on itImplementation of the ReactiveX API for asynchronous programming leveraging native Dart Streams.
- diogoogle_places_autocomplete_text_field depends on itA powerful HTTP networking package for Dart and Flutter with interceptors and request cancellation.