gmap_place_picker

Last updated:

0 purchases

gmap_place_picker Image
gmap_place_picker Images
Add to Cart

Description:

gmap place picker

gmap_place_picker #
A new Flutter plugin for get location detail from map.
Using #
Pubspec changes:
dependencies:
gmap_place_picker: ^1.0.0

copied to clipboard
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"/>
copied to clipboard
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
copied to clipboard
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)
}
}
copied to clipboard
update info.plist with NSLocationWhenInUseUsageDescription
<key>NSLocationWhenInUseUsageDescription</key>
<string>This app needs your location for location feature of the GMap place picker plugin.</string>
copied to clipboard
Example

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

copied to clipboard
USED PLUGIN

intl:
intl_translation:

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

copied to clipboard

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.