-
-
Notifications
You must be signed in to change notification settings - Fork 354
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not providing an initialPosition and denying location access throws assertion error #12
Comments
It is working as intended and this scenario should be prevented actually. 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? ;) |
|
@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
The text was updated successfully, but these errors were encountered: