A simple Flutter app to search for locations and track rides using Mapbox.
- Search for origin and destination locations using Mapbox Geocoding API
- View and track rides on a map
- Simple, clean UI
-
Clone the repository:
git clone <repo-url> cd mapbox_booking_app
-
Install dependencies:
flutter pub get
-
Configure your Mapbox Access Token:
- Open
lib/config.dart. - Replace the value of
mapboxAccessTokenwith your own Mapbox access token:// lib/config.dart const String mapboxAccessToken = 'YOUR_MAPBOX_ACCESS_TOKEN_HERE';
Note: The
lib/config.dartfile is included in.gitignoreto prevent accidental commits of your private token. - Open
-
Run the app:
flutter run
- Enter the origin (From) and destination (To) location names.
- Press the search icon or hit enter to resolve each location.
- Once both locations are resolved, press "Track Ride" to view the route on the map.
- Never share your Mapbox access token publicly.
- The
lib/config.dartfile is ignored by git for your safety.