gmap_place_picker

A new Flutter plugin for get location detail from map.

Using

Pubspec changes:

      dependencies:
        gmap_place_picker: ^0.0.3

Android

Specify Google API key in the application manifest android/app/src/main/AndroidManifest.xml:

<manifest ...
  <application ...
    <meta-data android:name="com.google.android.geo.API_KEY"
               android:value="YOUR KEY HERE"/>

iOS

Specify Google 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];
}
@end

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

import UIKit
import Flutter
import GoogleMaps

@UIApplicationMain
@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)
  }
}

update info.plist with NSLocationWhenInUseUsageDescription

  <key>NSLocationWhenInUseUsageDescription</key>
  <string>This app needs your location for location feature of the GMap place picker plugin.</string>

Example


  PlaceInfo result = await openPlacePicker(
                        context, apiKey,
                        initialCenter: LatLng(12.9716, 77.5946),
                        myLocationButtonEnabled: true,
                        layersButtonEnabled: true,
                        desiredAccuracy: LocationAccuracy.high,
                      );

USED PLUGIN


  intl:
  intl_translation:

  google_maps_flutter:
  location:
  android_intent:
  provider:
  http:
  stack_trace:
  package_info:

Libraries

AppLocalizer
gmap_place_picker
messages_all
messages_ar
messages_de
messages_en
messages_es
messages_fr
messages_it
messages_pt
messages_ru
messages_sr
messages_tr