location_navigator 1.0.3
location_navigator: ^1.0.3 copied to clipboard
A Flutter package to navigate and find nearby places using location.
π Location Navigator #
A Flutter package for discovering and navigating to nearby places of interest such as mosques, hospitals, restaurants, hotels, and pharmacies.
It leverages OpenStreetMap (Overpass API) and Geolocator to provide accurate, real-time location results.
β¨ Features #
- π Retrieve the userβs current location with permission handling
- π Display nearby mosques, hospitals, restaurants, hotels, pharmacies, and more
- π Dropdown menu for selecting amenity type
- π Built-in search box to filter places by name
- π Automatic sorting of places by distance
- πΊοΈ Integrated map view with markers and navigation support
- π¨ Clean Material Design with a teal theme
βοΈ How It Works #
-
Current Location Access
Uses the geolocator package to handle permissions and fetch the userβs current latitude and longitude. -
Nearby Places Query
Fetches data from OpenStreetMap Overpass API through aPlaceService.
Places are filtered by amenity type (e.g.,hospital,mosque,hotel). -
Distance Calculation
Each place is sorted based on proximity to the user using:Geolocator.distanceBetween( userLatitude, userLongitude, placeLatitude, placeLongitude, ); π Installation
Add this to your pubspec.yaml: dependencies: location_navigator: ^1.0.3