Skip to content
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

2 calls to enable GPS and get a location #37

Closed
riderofzion opened this issue May 22, 2018 · 1 comment
Closed

2 calls to enable GPS and get a location #37

riderofzion opened this issue May 22, 2018 · 1 comment

Comments

@riderofzion
Copy link

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

Future _showMeAndCenter()async {
  // Platform messages may fail, so we use a try/catch PlatformException.
  try {
    //_currentLocation = await _location.getLocation;
    _location = new Location();
    _currentLocation = await _location.onLocationChanged.firstWhere((d) => d != null);
  } on Exception {
    _currentLocation = null;
  }
}
@Lyokone
Copy link
Owner

Lyokone commented May 30, 2018

Hey,

Should be corrected on 1.3.3.
Feel free to post another issue if it's not corrected properly 👍
Thank you for your feedback !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants