This library aims at providing you a simple way to get the user location without thinking about permission. It's also configurable so you can achieve better performance or better battery life.
It currently supports Android, iOS, macOS, Web, Windows and Linux.
- ๐จโ๐ป๏ธ Easy to use
- ๐ฐ Handles requesting permission and enabling GPS automatically for you
- ๐ Highly configurable so you get the best performance / battery life for your usecase
- ๐ Works either with and without Google Play Services on Android phones
- ๐โโ๏ธ Background location updates
- โญ๏ธ [Flutter Favorite]
Start by installing Location!
Then, to get the location of your user you can simply do:
dart
final location = Location();
final locationData = await location.getLocation();
print("Location: ${locationData.latitude}, ${locationData.longitude}");