google_places_picker 0.0.1 copy "google_places_picker: ^0.0.1" to clipboard
google_places_picker: ^0.0.1 copied to clipboard

outdatedDart 1 only

A new flutter plugin project.

google_places_picker #

Google Place Picker and Autocomplete for Flutter

Getting Started #

Setting up #

  1. Go to your AndroidManifest.xml at android/app/src/main and add the following in between the application opening and closing tag, replacing YOUR_API_KEY with your api key, which you can get from the Google Developer Console:
<meta-data
      android:name="com.google.android.geo.API_KEY"
      android:value="YOUR_API_KEY"/>
  1. Go to AppDelegate.m/.swift in ios/Runner, and in the didFinishLaunchingWithOptions method add the following lines:
  • Swift

GMSPlacesClient.provideApiKey("YOUR_API_KEY")
GMSSServices.provideApiKey("YOUR_API_KEY")
  • Objective-C
[GMSPlacesClient provideApiKey:@"YOUR_API_KEY"];
[GMSServices provideApiKey:@"YOUR_API_KEY"];

Usage #

You can use the plugin via the showPlacePicker and showAutocomplete methods. The showAutocomplete method takes a PlaceAutocompleteMode paramater to know whether to display the fullscreen or the overlay control on Android (it has no effect on iOS). Both methods return a Place object with the following properties:

  • name
  • id
  • address
  • latitude
  • longitude
16
likes
0
pub points
84%
popularity

Publisher

unverified uploader

A new flutter plugin project.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on google_places_picker