smart_location 3.5.0
smart_location: ^3.5.0 copied to clipboard
Smart Location is a powerful, battery-conscious Flutter plugin for continuous background geolocation tracking, advanced geofencing, and motion-aware updates.
Smart Location 🌍 #
The absolute most scalable, resilient location tracking package for Flutter.
Whether you are building a simple weather app or a military-grade delivery logistics platform, smart_location scales perfectly with your needs.
🚀 Two Tiers of Power #
To keep things simple, smart_location is designed with two tiers.
Use Tier 1 if you are a beginner or just need simple tracking. Use Tier 2 if you are building an enterprise application.
🟢 Tier 1: SmartLocationLite (Beginners & Simple Apps) #
If you are building a weather app, dating app, or simple run tracker, use SmartLocationLite. It is incredibly lightweight, battery-friendly, and simple to use.
import 'package:smart_location/smart_location.dart';
// Get a single location
final myLocation = await SmartLocationLite.getCurrentLocation();
print("I am at: ${myLocation.latitude}, ${myLocation.longitude}");
// Track movement in the foreground
final sub = SmartLocationLite.trackMovement().listen((location) {
print("I am moving: ${location.latitude}");
});
That's it! No complex managers, no battery drain.
🔴 Tier 2: Enterprise Logistics (Delivery, Ride-Sharing) #
If you are building Uber, Doordash, or a fleet tracking system, you need the heavy artillery. The SmartLocation enterprise managers provide Anti-Spoofing, Dead Reckoning, Headless Background Sync, and more.
1. Unkillable Background Tracking
No more disappearing drivers. Our engine automatically resists aggressive battery savers (like Xiaomi/Samsung) and instantly resurrects your tracking service if the OS ever tries to force-kill it.
2. Zero-Drain Battery Sleeping
Track for days without draining the user's battery. The SDK flawlessly detects when the device becomes stationary and entirely powers down the GPS hardware, achieving virtually zero battery drain during idle periods without ever losing background tracking context.
3. Massive Geofencing (10,000+ Zones)
Instantly track a user against tens of thousands of geofences without any lag or battery drain. Supports Time-Gated Geofences (active only during certain hours) and Predictive Geofencing (spawning zones based on where the user is going).
4. Military-Grade Location Security
Ensure your location data is 100% tamper-proof. Secure sensitive tracking data so it can only be decrypted when the driver physically reaches the authorized destination. Automatically generate GDPR/CCPA compliance reports.
5. Driver Safety & Telematics
Automatically detect severe vehicle impacts with True Gravity-Independent Crash Detection. By stripping out the earth's gravity in real-time, the SDK completely eliminates the false positives caused by a phone simply falling off a dashboard or resting at an odd angle. Monitor speeding, distracted driving, and driving behavior with incredible accuracy.
6. Ultra-Low Network Offline Sync
If a driver enters a dead zone, data is encrypted and saved offline. When the network returns, our new ultra-compressed binary pipeline batches the data to your server, using up to 60% less cellular data and completing syncs exponentially faster than traditional JSON trackers.
7. Dead Reckoning (Tunnel Tracking)
When a driver enters a tunnel and loses GPS, the engine seamlessly maintains their tracking position.
8. Anti-Spoofing Engine
Automatically detect and block fraudulent or mocked location data.
9. Indoor Positioning
Maintain highly accurate tracking even when deep inside warehouses, parking garages, or multi-story malls.
10. Live Diagnostic Developer Tools
Use our Smart Location Doctor UI overlay to instantly view GPS health, active geofences, sync queues, and battery drain in real-time right on the device while testing.
⚡ Seamless Integration & Performance #
We designed Smart Location to be incredibly powerful, but we also made it completely flexible to match your business needs seamlessly.
🔌 Frictionless Backend Connectivity #
Whether you have a legacy backend or a modern cloud architecture, Smart Location connects instantly. You can choose to send your location data in universally accepted formats for zero-friction integration with your existing servers. Alternatively, if your priority is saving cellular costs, you can seamlessly switch on our ultra-compressed data pipeline (supported by our plug-and-play Server SDKs like the Node.js Engine) to save up to 60% on bandwidth.
🔋 Intelligent Battery Conservation #
You have total control over battery consumption. Smart Location understands the user's physical motion in real-time, allowing your app to intelligently conserve power. You can effortlessly configure the tracker to sleep when the device is completely stationary and instantly wake up the moment the user starts a trip, ensuring you never waste battery when it isn't needed.
🌲 Ultra-Lightweight App Footprint #
Worried about app bloat from massive enterprise features? Don't be. Our intelligent package architecture ensures that your app remains perfectly lightweight. When you compile your app for production, the build system automatically strips out any heavy enterprise features (like Anti-Spoofing or Dead Reckoning) that you aren't using. You get the power of an enterprise SDK with the microscopic footprint of a simple tracker.
🛠 Troubleshooting & Friction #
Are you facing Android Battery Killers, Gradle conflicts, or iOS Podfile issues? We have solved them all!
👉 Read the TROUBLESHOOTING.md Guide
License #
MIT License