Package selection guidance compiled from public package information, community data, and project usage.
A Flutter package that simplifies selecting a location from Google Maps. It provides an intuitive interface for users to pick a place by interacting with a map, making it ideal for apps requiring precise geolocation input. The package integrates seamlessly with Google Maps SDK and supports custom markers and location details retrieval. Designed for developers seeking a straightforward solution to implement map-based place selection without extensive boilerplate code.
Use cases
Map-based address selection
Location picker in forms
Travel or delivery app check-ins
Geotagging features
User profile location setup
Key features
Easy integration with Google Maps SDK
Customizable marker and UI
Returns detailed location data
Supports search and pin placement
Lightweight and focused on place picking
Suitable for
Developers building location-aware apps
Apps needing user-selected coordinates
Projects using Google Maps extensively
Prototypes requiring fast location input
Considerations
Requires Google Maps API key
Limited to Google Maps platform
No offline map support
Depends on internet connectivity
May need additional styling for UI consistency
Original README
Original README snapshot from the linked source repository. Visit the repository for the latest content.
Google Maps Pick Place
A pub.dev package to handle picking place from google map and use the picked data in the app.
On iOS you'll need to add the following entries to your Info.plist file (located under ios/Runner) in order to access the device's location.
Simply open your Info.plist file and add the following:
<key>NSLocationWhenInUseUsageDescription</key><string>This app needs access to location when open.</string><key>NSLocationAlwaysUsageDescription</key><string>This app needs access to location when in the background.</string><key>NSLocationAlwaysAndWhenInUseUsageDescription</key><string>This app needs access to location when open and in the background.</string>
In addition, you need to add the Background Modes capability to your XCode project (Project > Signing and Capabilties > "+ Capability" button) and select Location Updates.g>This app needs access to location when open and in the background.
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.
You can use GoogleMapsPickPlace by pushing to a new page using Navigator, OR put as a child of any widget.
When the user picks a place on the map, it will return result to 'getResult' with FullAddress type.
import'package:flutter/material.dart';
import'package:google_maps_pick_place/google_maps_pick_place.dart';
// ...Navigator.push(
context,
MaterialPageRoute(
builder: (context) => GoogleMapsPickPlace(
apiKey: "YOU GOOGLE MAPS API KEY",
getResult: (FullAddress result) {
print('${result.address}');
/// Don't use Navigator.of(context).pop() it's build in the method
},
),
),
);
Note
Searching for a place feature needs a paid google map api key.
With free key map and picking a place feature will work correctly without any error.
But searching for a place feature will not work.
Google Maps Pick Place Properties
Parameter
Type
Description
apiKey
String
Google Map Api Token
mapLanguage
Language
map's language used in search and other widgets
getResult
Function(FullAddress)?
Method of Getting the address and position
initialPosition
LatLng
Initial position of the map in case there's no location and GPS is off
enableMyLocationButton
bool
Enable or disable the My Location button
enableSearchButton
bool
Enable or disable the Search button
loader
Widget
Widget to show while the map is loading
doneButton
Widget?
Widget to show when the map is done loading and apply getResult method
errorButton
Widget?
Widget to show when there's a corruption or there's no internet connection