Describe the bug
I simplified code with this example
When GPS is off by default, await location.getLocation() stuck it never return
any next print statement never execute.
But When I enable GPS by default and launch application then it works
try{
currentLocation = await location.getLocation();
print("*******WORKING******");
} on PlatformException catch (e) {
print("*******PLATFORM EXCEPTION RETURNED******");
}
Expected behavior
It should not be stuck under await, either it should throw an exception which I already handling
Tested on:
Other plugins:
Same is happening to me when I don't allow to share the location
I got the same problem.
For now, I use this solution, This is a bad way but it works.

It is happening to me only on Android even if GPS is on and location is shared.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Most helpful comment
I got the same problem.
For now, I use this solution, This is a bad way but it works.