Skip to content
pubscout

detect_fake_location

2.3.2, released 10 months ago by zeexan.com

Detects whether the device location is being simulated or faked.

WASM-ready
$ flutter pub add detect_fake_location
Source repository

What it does

The plugin checks if the current location comes from software simulation or an external accessory. It provides an optional iOS‑only flag to ignore accessory‑based locations.

AI-written summary of version 2.3.2, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to guard location‑based features against spoofed data
  • Compliance or security requirements demand detection of mock locations

Skip it when

  • You only need raw location data without spoof detection
  • Targeting platforms earlier than iOS 15 where detection isn’t possible

Strengths

  • Simple API with a single async call
  • Supports both software‑simulated and accessory‑based detection
  • Configurable iOS option to reduce false positives

Weaknesses

  • iOS detection requires iOS 15+
  • No Android‑specific detection beyond permission handling
  • Limited to detection only, no mitigation

Setup

Kind
Plugin (native code)
Effort
Low
Code generation
No
Direct dependencies
2

Add detect_fake_location to pubspec, request location permissions (permission_handler), and include iOS/Android location permissions in Info.plist and AndroidManifest.xml.

bool isFake = await DetectFakeLocation().detectFakeLocation();

Alternatives

Packages that do the same job and could replace detect_fake_location.

Works with

Packages commonly used together with detect_fake_location: ones it builds on, ones built on it, and its own family.