place_picker_plus 0.0.1
place_picker_plus: ^0.0.1 copied to clipboard
Flutter plugin for Google Places and Autocomplete.
place_picker_plus #
Google Places Autocomplete for Flutter
Getting Started #
Setting up #
- Run the
initializemethod in yourmain.dart'sinitState(or anywhere it would only be called once) with your API keys as arguments:
import 'package:place_picker_plus/place_picker_plus.dart';
PluginGooglePlacePicker.initialize(
androidApiKey: "YOUR_ANDROID_API_KEY",
iosApiKey: "YOUR_IOS_API_KEY",
);
Usage #
You can use the plugin via the showAutocomplete methods, which takes a PlaceAutocompleteMode paramater to know whether to display the fullscreen or the overlay control on Android (it has no effect on iOS). It returns a Place object with the following properties:
- name
- id
- address
- latitude
- longitude