SafetyNetCheckResult class
Result of SafetyNetFlutter.check. Mirrors the "report only" design of
both native libraries this plugin wraps (iOS SafetyNet's ThreatEvent,
Android SafetyNetAndroid's RootCheckResult/DebuggerCheckResult):
a plain report, never an automatic reaction. Your app decides what to do
with it.
This is a deliberately minimal, lowest-common-denominator result that
works identically on both platforms. The two native libraries are not
symmetric — iOS reports a scored ThreatLevel across many signals
(jailbreak, debugger, proxy, code signature, ...), while Android reports
separate root/debugger booleans with no unified score. Rather than force
a fake unified severity scale, this plugin exposes the one thing both
platforms can express identically: was anything detected, and what
specifically fired. If you need the richer native detail (e.g. iOS's
ThreatLevel, or Android's per-check RootCheck/DebuggerCheck enums),
use the platform-specific channels documented in the README.
Constructors
-
SafetyNetCheckResult({required bool isCompromised, required List<
String> reasons}) -
const
-
SafetyNetCheckResult.fromMap(Map<
Object?, Object?> map) -
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isCompromised → bool
-
True if any selected check fired positive on this platform.
final
-
reasons
→ List<
String> -
Raw, platform-specific identifiers for exactly which checks fired
(e.g. iOS
ThreatReasonraw values like"jb_frida_port", or AndroidRootCheck/DebuggerCheckenum names like"MAGISK_BINARY"). Not unified across platforms on purpose — see the class doc comment.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited