Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to detect mock location in flutter for ios and android

I am using package of location and google maps flutter in my screen and I want to detect wether user using fake gps or not.. Is there a package that can detect mock location in flutter that available in android and ios? I have tried using TrustFall package but my app always close unexpectedly.. is there another way to detect mock location in flutter?

like image 947
wahyu Avatar asked Nov 08 '25 16:11

wahyu


2 Answers

Use Geolocator and check the Position object's isMocked property.

like image 145
Sachin Avatar answered Nov 11 '25 08:11

Sachin


I think better to use safe_device. It's working on both Android and IOS

like image 39
BIS Tech Avatar answered Nov 11 '25 08:11

BIS Tech



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!