google_maps_places_autocomplete_widgets
2.1.2, released 4 months ago by hiveright.tech
TextField and TextFormField widgets providing address autocompletion using the Google Maps Places API.
What it does
Provides drop-in replacements for Flutter TextField and TextFormField widgets that perform address and location autocompletion using the Google Maps Places API. It handles querying suggestions and populating comprehensive place details into form fields.
AI-written summary of version 2.1.2, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need users to input addresses using Google Maps Places autocomplete suggestions in a Flutter app.
- You want to automatically populate multiple form fields (such as city, state, and zip code) from a selected address.
Skip it when
- You need a full-screen interactive map view rather than text input autocompletion.
- You use a mapping backend other than Google Places.
Strengths
- Supports both modern Places API (New) and legacy endpoints, plus custom backends.
- Works across Android, iOS, web, Windows, macOS, and Linux.
- Offers options for securing your Google Maps API key via companion packages or proxy backends.
Weaknesses
- Requires a valid Google Maps API key and billing setup on Google Cloud.
- API key security requires careful handling on client platforms to prevent abuse.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 2
Requires enabling the Places API (New) on your Google Cloud project and supplying a Google Maps API key.
AddressAutocompleteTextField(
mapsApiKey: 'YOUR GOOGLE MAPS API KEY HERE',
onSuggestionClick: onSuggestionClick,
componentCountry: 'us',
language: 'en-US'
)Alternatives
Packages that do the same job and could replace google_maps_places_autocomplete_widgets.
- searchfield
An autocomplete search widget with customizable suggestions, validation, and keyboard navigation.
79Compare - mask_text_input_formatter
TextInputFormatter for TextField and TextFormField to format input using a given mask.
50Compare - easy_mask
Apply input masks to TextFields, TextFormFields, and Strings easily.
50Compare - mask_input_formatter
A TextInputFormatter that applies a custom mask to TextField/TextFormField input.
48Compare
Works with
Packages commonly used together with google_maps_places_autocomplete_widgets: ones it builds on, ones built on it, and its own family.