Closed nstrelow closed 4 years ago
It is working as intended and this scenario should be prevented actually. I will change [initialPosition] to be required in the next update as it needs to be.
The map needs to be initialised with at least one location (required by GoogleMap), which would be either [initialPosition] or [currentLocation = useCurrentLocation(true)] with GPS. So, if you want users to make sure they use their GSP for the initial map location, I would suggest you to use permission handling package and lead them to the device setting screen if they deny it.
So, in summary, the initial position is a sort of back-up solution for the scenario that we cannot fetch current location from the user, and thus initial position should be set as default.
Does it make sense? ;)
I will change [initialPosition] to be required in the next update as it needs to be. Exactly what I thought 😁 Thanks for adding it!
@nstrelow Glad to hear that ;) Cheers
Describe the bug Tested on Android 10 with example from this repo. When not specifying an initialPosition and opening the PlacePicker Android asks for location permission. Pressing deny throws an assertion error.
To Reproduce Steps to reproduce the behavior:
Expected behavior Be able to deny location permission without errors.
Error log
Flutter Doctor -v