Closed SalihCanBinboga closed 1 year ago
Hello @tlserver , If there is any issue related to this development, please let me know so that we can discuss it together 👋
Accepted this PR with some modification in version 7.0.4 or 8.0.0-dev.2. To keep CurrentLocationLayer() simple, I only add requestPermissionCallback
in LocationMarkerDataStreamFactory.defaultPositionStreamSource()
since CurrentLocationLayer()
can accept custom position stream. If position stream is provided, parameter for default stream have no effect. Here is a example code:
const streamFactory = LocationMarkerDataStreamFactory();
CurrentLocationLayer(
positionStream: streamFactory.fromGeolocatorPositionStream(
stream: streamFactory.defaultPositionStreamSource(
requestPermissionCallback: null, // null to disable auto request or a callback to display dialog box or something else and request permission
),
),
);
Thank you for contributing.
The parameter named [
enabledLocationPermissionRequest
] was added to prevent automatic location permission requests. In some cases, a dialog box may need to be displayed to request special location permission.