location_navigator 1.0.0 copy "location_navigator: ^1.0.0" to clipboard
location_navigator: ^1.0.0 copied to clipboard

A Flutter package to navigate and find nearby places using location.

πŸ“ Location Navigator #

A Flutter package to find and navigate nearby places (e.g. Mosques, Hospitals, Hotels, Restaurants, Pharmacies) using OpenStreetMap data and Geolocator.


✨ Features #

  • πŸ”Ž Get user's current location with permission handling.
  • πŸ•Œ Show nearby Mosques, Hospitals, Restaurants, Hotels, Pharmacies etc.
  • πŸ“ Dropdown to select place type (amenity).
  • πŸ“ Search box to filter nearby places by name.
  • πŸ“ Places sorted automatically by distance.
  • πŸ—ΊοΈ Built-in Map view with markers and navigation.
  • 🎨 Simple Material Design with teal theme.

βš™οΈ How It Works #

  1. Get Current Location
    The package uses geolocator to request location permission and fetch the user's latitude & longitude.

  2. Fetch Nearby Places
    It calls OpenStreetMap (Overpass API) through a service (PlaceService) to search for nearby places based on amenity type (e.g. hospital, mosque, hotel).

  3. Distance Calculation
    Each place's distance from the user is calculated using Geolocator.distanceBetween(...).

  4. Sorting & Filtering

    • If the user selects a category (Hospital, Mosque etc.), results are filtered by that.
    • If the user types in the search box, results are filtered by name.
    • Finally, places are sorted by nearest distance.
  5. Display Results

    • A ListView shows the places with name, type, and distance.
    • Tapping an item opens a Map screen (powered by flutter_map) where the selected place and user location are displayed.

πŸ“¦ Installation #

Add the dependency in your pubspec.yaml:

dependencies:
  location_navigator: ^1.0.0
Then run:
flutter pub get

5
likes
0
points
44
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter package to navigate and find nearby places using location.

Repository (GitHub)
View/report issues

Documentation

Documentation

License

unknown (license)

Dependencies

cupertino_icons, flutter, flutter_map, geolocator, http, latlong2

More

Packages that depend on location_navigator