Google Place Picker and Autocomplete for Flutter
android/app/src/mainand add the following in between the
applicationopening and closing tag, replacing
YOUR_API_KEYwith 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"/>
ios/Runner, and in the
didFinishLaunchingWithOptionsmethod add the following lines:
[GMSPlacesClient provideAPIKey:@"YOUR_API_KEY"]; [GMSServices provideAPIKey:@"YOUR_API_KEY"];
You can use the plugin via the
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:
Demonstrates how to use the google_places_picker plugin.
For help getting started with Flutter, view our online documentation.
Add this to your package's pubspec.yaml file:
dependencies: google_places_picker: ^0.1.0
You can install packages from the command line:
$ flutter packages get
Alternatively, your editor might support
flutter packages get.
Check the docs for your editor to learn more.
Now in your Dart code, you can use:
|0.1.0||Jan 19, 2019|
|0.0.9||Nov 3, 2018|
|0.0.8||Nov 3, 2018|
|0.0.7||Nov 3, 2018|
|0.0.6||Sep 21, 2018|
|0.0.5||Sep 3, 2018|
|0.0.4||May 20, 2018|
|0.0.3||May 20, 2018|
|0.0.2||May 19, 2018|
|0.0.1||May 19, 2018|
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
We analyzed this package on Feb 14, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
Detected platforms: Flutter
References Flutter, and has no conflicting libraries.
Document public APIs. (-1 points)
21 out of 21 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.
flutter format to format
The package description is too short. (-10 points)
Add more detail to the
description field of
pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.