google_map_location_picker library

Classes

AndroidSettings
Represents different Android specific settings with which you can set a value other then the default value of the setting.
AppleSettings
Represents different iOS specific settings with which you can set a value other then the default value of the setting.
ForegroundNotificationConfig
Configuration for the foreground notification. When this is provided the location service will run as a foreground service.
Geolocator
Wraps CLLocationManager (on iOS) and FusedLocationProviderClient or LocationManager (on Android), providing support to retrieve position information of the device.
GeolocatorPlatform
The interface that implementations of geolocator must implement.
LocationPicker
LocationPickerState
LocationResult
The result returned after completing location selection.
LocationSettings
Represents the abstract LocationSettings class with which you can configure platform specific settings.
Position
Contains detailed location information.

Enums

ActivityType
Represents the possible iOS activity types.
LocationAccuracy
Represent the possible location accuracy values.
LocationAccuracyStatus
Represent the current Location Accuracy Status on iOS 14.0 and higher.
LocationPermission
Represent the possible location permissions.
ServiceStatus
Describes the current state of the location service on the native platform.

Extensions

IntergerExtensions on int
Provides extension methods on the LocationAccuracy enum.

Functions

showLocationPicker(BuildContext context, String apiKey, {LatLng initialCenter = const LatLng(45.521563, -122.677433), double initialZoom = 16, bool requiredGPS = false, List<String> countries = const ["IN"], bool myLocationButtonEnabled = false, bool layersButtonEnabled = false, bool automaticallyAnimateToCurrentLocation = true, String? mapStylePath, Color appBarColor = Colors.transparent, BoxDecoration? searchBarBoxDecoration, String? hintText, Widget resultCardConfirmIcon = const Icon(Icons.arrow_forward), Alignment resultCardAlignment = Alignment.bottomCenter, EdgeInsets resultCardPadding = const EdgeInsets.all(16.0), Decoration? resultCardDecoration, String language = 'en', LocationAccuracy desiredAccuracy = LocationAccuracy.best}) Future<LocationResult?>
Returns a LatLng object of the location that was picked.

Exceptions / Errors

ActivityMissingException
An exception thrown when executing functionality which requires an Android while no activity is provided.
AlreadySubscribedException
An exception thrown when subscribing to receive positions while another subscription is already active.
InvalidPermissionException
An exception thrown when trying to convert a unknown permission into the LocationPermission enum.
LocationServiceDisabledException
An exception thrown when trying to access the device's location information while the location service on the device is disabled.
PermissionDefinitionsNotFoundException
An exception thrown when the required platform specific permission definitions could not be found (e.g. in the AndroidManifest.xml file on Android or in the Info.plist file on iOS).
PermissionDeniedException
An exception thrown when trying to access the device's location information while access is denied.
PermissionRequestInProgressException
An exception thrown when requesting location permissions while an earlier request has not yet been completed.
PositionUpdateException
An exception thrown when something went wrong while listening for position updates.