ScanOptions class

Configures a scan.

Every check* flag defaults to true, except checkSignatureMismatch which is only meaningful with expectedSignatureSha256 or expectedTeamIds and therefore defaults to "on when either is provided" (see its documentation). The constructor asserts that checks which need configuration receive it, so a misconfigured scan fails in debug builds instead of silently doing nothing.

Constructors

ScanOptions({bool checkVpn = true, bool checkProxy = true, bool checkMockLocation = true, bool checkVirtualCamera = true, bool checkEmulator = true, bool checkRooted = true, bool checkHooked = true, bool checkDebugger = true, bool checkScreenCapture = true, bool checkAutomation = true, bool checkDeveloperOptions = true, bool checkAdb = true, bool checkClockTampering = true, bool checkUntrustedInstaller = true, bool? checkSignatureMismatch, bool checkAccessibilityAbuse = true, bool checkRemoteControlApp = true, bool checkClonedApp = true, bool checkUserCertificates = true, bool checkSideloaded = true, bool checkActiveCall = true, bool checkNoScreenLock = true, bool checkAppDataMigrated = true, List<String> expectedSignatureSha256 = const <String>[], List<String> expectedTeamIds = const <String>[], List<String> trustedInstallers = defaultTrustedInstallers, List<String> allowedAccessibilityServices = const <String>[], Duration maxClockSkew = const Duration(minutes: 5), DateTime? trustedTime})

Properties

allowedAccessibilityServices → List<String>
Accessibility service package names that are allowed (for example your own app or a screen reader you want to tolerate).
final
checkAccessibilityAbuse → bool
Non-system accessibility services that can read the screen.
final
checkActiveCall → bool
A phone call (cellular or VoIP) is in progress. Scammers keep victims on the line while they approve a payment. Android reads the audio mode and needs no permission. iOS asks CallKit, which the plugin loads only when this check runs: apps in the China App Store, where CallKit is not allowed, should turn this off.
final
checkAdb → bool
USB or wireless debugging enabled.
final
checkAppDataMigrated → bool
The app's data was restored from a backup or copied from another device: a marker the plugin keeps in the app's preferences is there, but the key it created on this device next to it is not. It stays detected until FlutterAntiVirtuals.rebindDevice is called, for example after the user signs in again.
final
checkAutomation → bool
The app is driven by a tool instead of a person. Android: the monkey tester, test harness mode, a connected UiAutomation (UI Automator, Appium) and installed automation helpers; web: navigator.webdriver and headless Chrome. iOS gives an app no way to tell.
final
checkClockTampering → bool
Automatic time off, or skew against trustedTime.
final
checkClonedApp → bool
App running in a clone / parallel-space container.
final
checkDebugger → bool
A debugger attached to the process (Java debugger, TracerPid, iOS P_TRACED). A debug build run from your IDE reports it too.
final
checkDeveloperOptions → bool
Android developer options enabled.
final
checkEmulator → bool
Android emulator (Android Studio, Genymotion, BlueStacks, Nox, LDPlayer, MEmu, ...) or the iOS Simulator.
final
checkHooked → bool
Instrumentation frameworks in the app process: Frida (libraries, threads, the default server port), Xposed/LSPosed/EdXposed, Substrate and similar.
final
checkMockLocation → bool
Mocked GPS location or installed mock-location apps.
final
checkNoScreenLock → bool
The device has no PIN, pattern, password or passcode.
final
checkProxy → bool
System, per-network or PAC proxy.
final
checkRemoteControlApp → bool
Remote-control apps (AnyDesk, TeamViewer, ...) installed.
final
checkRooted → bool
Android root (su binaries, Magisk, KernelSU, root apps, writable system partition, ...) or an iOS jailbreak (Cydia, Sileo, /var/jb, writing outside the sandbox, ...).
final
checkScreenCapture → bool
The screen is being recorded or mirrored, or an external or wireless display is connected (Android: presentation displays, and screen recording on Android 15+; iOS: UIScreen.isCaptured and extra screens).
final
checkSideloaded → bool
iOS build with an embedded provisioning profile.
final
checkSignatureMismatch → bool?
The app was signed by someone else: on Android a signing certificate that is not in expectedSignatureSha256, on iOS a team ID that is not in expectedTeamIds or an App Store binary whose encryption was stripped.
final
checkUntrustedInstaller → bool
Installer not in trustedInstallers.
final
checkUserCertificates → bool
User-installed CA certificates.
final
checkVirtualCamera → bool
Virtual/external cameras and known virtual-camera apps.
final
checkVpn → bool
Active VPN transport or tunnel interface.
final
enabledSignals → Set<AntiVirtualSignal>
The signals this configuration will evaluate.
no setter
expectedSignatureSha256 → List<String>
Lower-case hex SHA-256 digests of the release signing certificate(s). Used by checkSignatureMismatch on Android.
final
expectedTeamIds → List<String>
Apple Developer team IDs (ten characters, such as ABCDE12345) allowed to sign the app. Used by checkSignatureMismatch on iOS.
final
hashCode → int
The hash code for this object.
no setteroverride
maxClockSkew → Duration
Largest tolerated difference between the device clock and trustedTime.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
trustedInstallers → List<String>
Android installer package names considered trustworthy. An app with no installer (adb, tooling) is always reported, including debug builds.
final
trustedTime → DateTime?
Authoritative time, normally taken from a server response. Without it the clock check only looks at the automatic-time settings.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onlyChecking(AntiVirtualSignal signal) → ScanOptions
A copy that only evaluates signal; every other check is turned off.
toMap() → Map<String, Object?>
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
Value equality, so an inline ScanOptions(...) in a build method is equal to the previous one and does not look like a configuration change.
override

Constants

defaultTrustedInstallers → const List<String>
App stores trusted by default. Deliberately excludes com.google.android.packageinstaller, which is the installer used for manually installed (sideloaded) APKs.