place_picker 0.9.11

  • Readme
  • Changelog
  • Example
  • Installing
  • 98

Flutter Place Picker Pub

The missing location picker made in Flutter for Flutter. With dark theme support.

⚠️ Please note: This library will NOT be affected by the deprecation of Place Picker as indicated here.

🍭 Remember to enable Places API, Maps SDK for Android and Maps SDK for iOS for your API key.

Usage #

To use this plugin, add place_picker as a dependency in your pubspec.yaml file.

Getting Started #

This package relies on google_maps_flutter to display the map. Follow these guidelines to add your API key to the Android and iOS packages.

Get an API key at if you haven't already.

Android #

Specify your API key in the application manifest android/app/src/main/AndroidManifest.xml and add ACCESS_FINE_LOCATION permission:

<manifest ...

  <!-- Add this permission -->
  <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

  <application ...
    <!-- Add your api key here -->
    <meta-data android:name=""
               android:value="YOUR KEY HERE"/>
    <activity ..../>

Update your file with this:


Please also make sure that you have those dependencies in your build.gradle:

  // parent level build.gradle (android/build.gradle)
  dependencies {
      classpath ''
      classpath ''

  // app level build.gradle (android/app/build.gradle)
  compileSdkVersion 28

iOS #

Specify your API key in the application delegate ios/Runner/AppDelegate.m:

#include "AppDelegate.h"
#include "GeneratedPluginRegistrant.h"
#import "GoogleMaps/GoogleMaps.h"

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application
    didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
  [GMSServices provideAPIKey:@"YOUR KEY HERE"];
  [GeneratedPluginRegistrant registerWithRegistry:self];
  return [super application:application didFinishLaunchingWithOptions:launchOptions];

Or in your swift code, specify your API key in the application delegate ios/Runner/AppDelegate.swift:

import UIKit
import Flutter
import GoogleMaps

@objc class AppDelegate: FlutterAppDelegate {
  override func application(
    _ application: UIApplication,
    didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?
  ) -> Bool {
    GMSServices.provideAPIKey("YOUR KEY HERE")
    GeneratedPluginRegistrant.register(with: self)
    return super.application(application, didFinishLaunchingWithOptions: launchOptions)

Opt-in to the embedded views preview by adding a boolean property to the app's Info.plist file with the key io.flutter.embedded_views_preview and the value YES.


Also add these to the dict values in Info.plist for location request to work on iOS info.plist

Sample Usage #

Import the package into your code

import 'package:place_picker/place_picker.dart';

Create a method like below, and call it in onTap of a button or InkWell. A LocationResult will be returned with the name and lat/lng of the selected place. You can then handle the result in any way you want. Pass in an optional LatLng displayLocation to display that location instead. This is useful when you want the map to display the previously selected location.

void showPlacePicker() async {
    LocationResult result = await Navigator.of(context).push(MaterialPageRoute(
        builder: (context) =>
            PlacePicker("YOUR API KEY",
                        displayLocation: customLocation,

    // Handle the result in your way

[0.9.11] - 9 Dec 2019.

Dark Theme support

[0.9.10] - 3 Dec 2019.

Pass custom initial location or previously selected location.

[0.9.9] - 5 Aug 2019.

Added place id and formatted address to results

[0.9.8] - 29 Jun 2019.

Hide keyboard on suggestion selection. Refactoring.

[0.9.7] - 10 Jun 2019.

Consistent UI. Made installation guidelines more clearer.

[0.9.6] - 9 Jun 2019.

Fixed fatal typo

[0.9.5] - 9 Jun 2019.

Fixed issue where autocomplete overlay still remain after widget has been disposed until whole app is restarted.

[0.9.4] - 8 Jun 2019.

Working on library health.

[0.9.3] - 8 Jun 2019.

Fixed issue with delayed call to searchPlace

searchPlace was being called (sometimes) after the widget has unmounted.
This could have been due to some delay caused by the debouncer proceeding after the widget has unmounted

[0.9.2] - 8 Jun 2019.

Fixed issue where setState from http response callbacks was being called after widget was disposed/unmounted

[0.9.1] - 1 Jun 2019.

Updated guidelines to include missing configurations

[0.9.0] - 1 Jun 2019.

Prepared for usage.

[0.0.2] - 1 Jun 2019.

Fixes to package publication health. Added example.

[0.0.1] - 1 Jun 2019.

Initial release.


import 'package:flutter/material.dart';
import 'package:place_picker/place_picker.dart';

class PickerDemo extends StatefulWidget {
  State<StatefulWidget> createState() => PickerDemoState();

class PickerDemoState extends State<PickerDemo> {
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('Picker Example')),
      body: Center(
        child: FlatButton(
          child: Text("Pick Delivery location"),
          onPressed: () {

  void showPlacePicker() async {
    LocationResult result = await Navigator.of(context).push(
        MaterialPageRoute(builder: (context) => PlacePicker("YOUR API KEY")));

    // Handle the result in your way

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  place_picker: ^0.9.11

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:place_picker/place_picker.dart';
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]
Learn more about scoring.

We analyzed this package on Jan 24, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.0
  • pana: 0.13.4
  • Flutter: 1.12.13+hotfix.5


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
google_maps_flutter ^0.5.21+12 0.5.21+15
http ^0.12.0+2 0.12.0+4
location ^2.3.5 2.3.5
Transitive dependencies
async 2.4.0
charcode 1.1.2
collection 1.14.11 1.14.12
http_parser 3.1.3
meta 1.1.8
path 1.6.4
pedantic 1.9.0
sky_engine 0.0.99
source_span 1.6.0
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies