You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think the API is stuck on the await _location.onLocationChanged.firstWhere((d) => d != null); when the location is not enabled beforehand. The app still asks to enable the location but after enabling it, it's stuck.
If I want a location, I have to call my method again
Future_showMeAndCenter()async {
// Platform messages may fail, so we use a try/catch PlatformException.try {
//_currentLocation = await _location.getLocation;
_location =newLocation();
_currentLocation =await _location.onLocationChanged.firstWhere((d) => d !=null);
} onException {
_currentLocation =null;
}
}
The text was updated successfully, but these errors were encountered:
Hi,
I think the API is stuck on the
await _location.onLocationChanged.firstWhere((d) => d != null);
when the location is not enabled beforehand. The app still asks to enable the location but after enabling it, it's stuck.If I want a location, I have to call my method again
The text was updated successfully, but these errors were encountered: