trust_location
2.0.13, released 6 years ago by whenwemeet.xyz
A Flutter plugin for detecting mock locations on Android devices.
WASM-ready
What it does
Trust Location allows developers to query current geographic coordinates and detect whether an Android device is using a mock location. It supports both one-time queries and periodic streams.
AI-written summary of version 2.0.13, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to prevent GPS spoofing or fake locations in your Android app.
- You want to monitor user location changes alongside mock location detection using a timer stream.
Skip it when
- You need robust iOS mock location detection (this plugin explicitly supports Android).
- You do not require high accuracy location mode.
Strengths
- Provides a simple boolean flag to check for mock locations.
- Supports stream-based location updates with configurable timer intervals.
Weaknesses
- Limited to Android devices.
- Requires high accuracy location mode to be enabled in Android settings.
Setup
- Kind
- Plugin (native code)
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
Requires adding ACCESS_FINE_LOCATION or ACCESS_COARSE_LOCATION permissions to the Android Manifest and enabling high accuracy mode.
bool isMockLocation = await TrustLocation.isMockLocation;Alternatives
Packages that do the same job and could replace trust_location.
- geolocator
Pick geolocator if you need a comprehensive, cross-platform geolocation plugin that also provides mock location detection on Android.
97Compare