gmap_place_picker 1.0.1 copy "gmap_place_picker: ^1.0.1" to clipboard
gmap_place_picker: ^1.0.1 copied to clipboard

A new Flutter plugin for get location detail from map.You can get exact pinned location info from google map.

gmap_place_picker #

A new Flutter plugin for get location detail from map.

Using #

Pubspec changes:

      dependencies:
        gmap_place_picker: ^1.0.0

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:

3
likes
30
pub points
16%
popularity

Publisher

unverified uploader

A new Flutter plugin for get location detail from map.You can get exact pinned location info from google map.

License

Unlicense (LICENSE)

Dependencies

android_intent, flutter, flutter_localizations, google_maps_flutter, http, intl, location, package_info, provider, stack_trace

More

Packages that depend on gmap_place_picker