checkMockLocation abstract method

Future<bool> checkMockLocation({
  1. bool strictMode = true,
})

Checks if a mock/fake location is being injected.

If strictMode is true (default), also returns true if any known GPS spoofing app is installed, even if not currently active.

If strictMode is false, only returns true when mock location is actively being used.

Note: on iOS, strictMode has no effect — only active simulation is detectable via Apple's CoreLocation API.

Implementation

Future<bool> checkMockLocation({bool strictMode = true});