google_places_autocomplete_text_field 4.0.0 copy "google_places_autocomplete_text_field: ^4.0.0" to clipboard
google_places_autocomplete_text_field: ^4.0.0 copied to clipboard

A fully customizable Google Places autocomplete TextFormField for Flutter iOS, Android and Web.

Changelog 🪵 #

4.0.0 #

  • [Breaking]: Removed predictionTextBuilder and replaced it with predictionBuilder to enable fully custom widgets (thank you @shanakamadusanka!)
  • [Feat]: Added suggestionsFieldMask and placeDetailsFieldMask to the GoogleApiConfig to enable explicit field mask setting per request (thank you @RobK410!)
  • [Fix]: The language code is now always passed to the request and uncoupled from the countries flag (thank you @srappose for opening issue #58!)

3.0.0 #

  • [Breaking]: Explicitly passed TextEditingControllers are not disposed by the widget anymore, but have to be handled manually (thank you @Brandon2255p!)
  • [Feat]: Added predictionTextBuilder for custom text and predictionTextStyle for styling per prediction (thank you @fedecarroz!)

2.0.3 #

  • [Chore]: README update

2.0.2 #

  • [Feat]: The text field unfocuses after a suggestion has been selected. This behaviour can be prohibited by setting keepFocusAfterSuggestionSelection = true.
  • [Feat]: Whenever the API returns an empty list of predictions, a placeholder widget will be shown inside the overlay, indicating that the request yielded no results. Customize this widget by using predictionsEmptyWidget.
  • [Fix]: Added null-safe casts to prevent deserialization from breaking for predictions without types (thank you @stanimeros for opening issue #48!)

2.0.1 #

  • [Fix]: The proxy URL now completely overrides the default prefix (https), instead of simply prepending the URL (thank you @abimbola-michael-punch!)

2.0.0 #

  • [Breaking]: Introduced the GoogleApiConfig class to manage the Google Places API Configuration.
  • [Breaking]: Renamed onPlaceDetailsWithCoordinatesReceived to onPredictionWithCoordinatesReceived.
  • [Breaking]: Bumped up SDK version to 3.7.2.
  • [Feat]: Add locationBias and locationRestriction parameters to the api config(see more info in the Google docs)
  • [Feat]: Add includedPrimaryTypes parameter to the api config (see more info in the Google docs)

1.1.0 #

  • [Docs]: Add documentation for undocumented class members (thank you @Pietrucci-Blacher!)
  • [Fix]: Handle unhandled exception when widget is disposed (thanks for finding this bug @jsanders5!)
  • [Fix]: Improve the error handling in the API class (thank you @Alienjob!)
  • [Feat]: Add language code functionality to receive API answers in the specified language (thank you @raulgarciaalcaraz-zero!)

1.0.0 #

All the changes marked with (*) are the work of @lucaantonelli, thank you a lot!

  • [Breaking]: Implement new Places API (*)
  • [Add]: Add a minimum input length (*)
  • [Add]: Add the possibility to use a session token (thanks for the first implementation @lucaantonelli!)
  • [Add]: Add the maxHeight parameter to manipulate the overlay height (special thanks to @Muhammed-Ayad!)
  • [Chore]: Remove unused toJson methods from several classes
  • [Chore]: Added doc comments to GooglePlacesAutoCompleteTextFormField
  • [Breaking]: Rename itmClick to onSuggestionClicked
  • [Breaking]: Rename isLatLngRequired to fetchCoordinates
  • [Breaking]: Rename overlayContainer to overlayContainerBuilder
  • [Breaking]: Remove unnecessary typedefs: GetPlaceDetailswWithLatLng, ItemClick and OverlayContainer
  • [Fix]: Make the TextEditingController nullable and ensure the initialValue property can be used (thanks for finding this bug @trusilosv!)
  • [Add]: Add the fetchSuggestionsForInitialValue parameter to instantly fetch suggestions when an initial value is given.
  • [Refactor]: Extract the Google Places API logic into an own class
  • [Fix]: Make sure the overlay adapts to multiline input (thanks for finding this bug @iamdiogo!)
  • [Breaking]: Rename getPlaceDetailWithLatLngto onPlaceDetailsWithCoordinatesReceived

0.1.3 #

  • [Fix]: Removed the duplicate declaration of the fields inputDecoration and decoration, which were misleading. Now only the field decoration is available to assign a InputDecoration to the GooglePlacesAutoCompleteTextFormField, following the TextFormField convention.

0.1.2 #

  • [Add]: New argument validator now you can validate the field if it's used inside the Form widget. More information is available in the example.
  • [Update]: Example updated.

0.1.1 #

  • [Fix]: Fixed a bug where the Google API Url would not be correctly built if no proxy URL was provided.

0.1.0 #

  • [Add]: Added compatibility for Flutter Web 🌐. Just pass the GooglePlacesAutoCompleteTextFormField a proxy URL and you're good to go!

0.0.3 #

  • [Fix]: Fixed a bug on MacOS where clicking on the predictions would not be registered.

0.0.2 #

  • [Add]: New argument overlayContainer so that you can now fully customize the appearance of the predictions as well!
  • [Fix]: Fixed a bug where the overlay with the predictions would not be closed as soon as the focus is lost.

0.0.1 #

  • Initial release of a fully customizable TextFormField that sends your input to the Google Places API and provides you with suggestions for autocompletion.
38
likes
160
points
3.47k
downloads

Documentation

API reference

Publisher

verified publishergowdysoftware.de

Weekly Downloads

A fully customizable Google Places autocomplete TextFormField for Flutter iOS, Android and Web.

Repository (GitHub)
View/report issues

License

BSD-3-Clause (license)

Dependencies

async, dio, flutter, rxdart

More

Packages that depend on google_places_autocomplete_text_field