SecurityCheckType enum
The types of security checks that can be performed on the user's device.
Each value corresponds to a potential security vulnerability. When a security scan identifies an issue, the associated SecurityCheckType can be used to understand the nature of the problem and retrieve a user-friendly message explaining the situation.
void showSecurityWarning(SecurityCheckType issue) {
print('A security issue was detected: ${issue.name}');
print('User message: ${issue.message}');
}
// Simulate a jailbroken device detection.
showSecurityWarning(SecurityCheckType.isJailBroken);
// Output:
// A security issue was detected: isJailBroken
// User message: This app cannot be used on jailbroken or rooted devices...
Values
- isNotTrust → const SecurityCheckType
-
The certificate or trust chain presented by the server is not trusted.
const SecurityCheckType(Strings.securityCheckerSingleIssueNotTrusted) - isJailBroken → const SecurityCheckType
-
The device has been jailbroken (iOS) or rooted (Android).
const SecurityCheckType(Strings.securityCheckerSingleIssueJailBroken) - isRealDevice → const SecurityCheckType
-
The app is not running on a real physical device (for example, an emulator or simulator).
const SecurityCheckType(Strings.securityCheckerSingleIssueNotRealDevice) - isOnExternalStorage → const SecurityCheckType
-
The app is installed on external storage rather than the device's internal storage.
const SecurityCheckType(Strings.securityCheckerSingleIssueOnExternalStorage) - isDevMode → const SecurityCheckType
-
Developer mode is enabled on the device.
const SecurityCheckType(Strings.securityCheckerSingleIssueDevMode) - checkForIssues → const SecurityCheckType
-
Multiple security issues were detected simultaneously.
const SecurityCheckType(Strings.securityCheckerMultiIssueBase) - isTampered → const SecurityCheckType
-
The app binary has been tampered with or modified after installation.
const SecurityCheckType(Strings.securityCheckerSingleIssueTampered)
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- message → String
-
The localisation key for the user-facing message describing this security issue.
final
- name → String
-
Available on Enum, provided by the EnumName extension
The name of the enum value.no setter - 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.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
-
values
→ const List<
SecurityCheckType> - A constant List of the values in this enum, in order of their declaration.