A Flutter-based real-time live location tracking application using Google Maps and device GPS. This repository demonstrates how to track a user’s location in real time, display it on a map, and update markers smoothly — suitable for delivery, ride-sharing, logistics, and tracking apps.
This project showcases:
- 📍 Real-time user location tracking
- 🗺️ Google Maps integration
- 📌 Live marker updates on map
- 🎯 Camera movement with location changes
- 🔐 Runtime location permissions handling
- 🧭 Clean and simple tracking UI
This repository can be used as a starter template or reference implementation for live tracking features.
- Flutter (UI & application logic)
- google_maps_flutter (Map rendering)
- geolocator (GPS & live location updates)
- permission_handler (Location permissions)
lib/
├── main.dart
├── screens/
│ └── live_tracking_screen.dart
├── services/
│ └── location_service.dart
├── widgets/
│ └── map_view.dart
pubspec.yaml
- Continuously listens to GPS location updates
- High-accuracy positioning support
- Displays current location on map
- Animated camera updates
- Customizable markers
- Requests location permissions at runtime
- Gracefully handles denied permissions
Add the following to your pubspec.yaml:
dependencies:
flutter:
sdk: flutter
flutter_svg: ^2.0.17
location: ^8.0.0
flutter_polyline_points: ^2.1.0
google_maps_flutter: ^2.12.1
- Go to Google Cloud Console
- Enable Maps SDK for Android and Maps SDK for iOS
- Generate an API key
android/app/src/main/AndroidManifest.xml
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="YOUR_GOOGLE_MAPS_API_KEY" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />ios/Runner/Info.plist
<key>NSLocationWhenInUseUsageDescription</key>
<string>Location access is required for live tracking</string>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>Location access is required for live tracking</string>ios/Runner/AppDelegate.swift
import GoogleMaps
GMSServices.provideAPIKey("YOUR_GOOGLE_MAPS_API_KEY")flutter pub get
flutter runRun the app on a real device or emulator with location enabled.
- 🚚 Delivery & logistics tracking
- 🚕 Ride-sharing applications
- 🧑💼 Employee location tracking
- 📦 Fleet management systems
- 📍 Live location sharing apps
Jatin Sharma Flutter Developer
GitHub: https://github.com/sharmajatin1997
If this repository helps you:
- ⭐ Star the repo
- 🍴 Fork it
- 🧑💻 Use it in your projects
This project is open-source and available under the MIT License.
⚠️ Note: For production apps, always secure your Google Maps API key and handle background location permissions carefully.