BiometricError enum
Standardized error codes for the plugin.
Values
- success → const BiometricError
-
The operation was successful.
- userCanceled → const BiometricError
-
The user canceled the operation.
- notAvailable → const BiometricError
-
Biometric authentication is not available on this device.
- notEnrolled → const BiometricError
-
No biometrics are enrolled.
- lockedOut → const BiometricError
-
The user is temporarily locked out due to too many failed attempts.
- lockedOutPermanent → const BiometricError
-
The user is permanently locked out until they log in with a strong method.
- keyNotFound → const BiometricError
-
The requested key was not found.
- keyInvalidated → const BiometricError
-
The key has been invalidated (e.g. by new biometric enrollment).
- unknown → const BiometricError
-
An unknown error occurred.
- invalidInput → const BiometricError
-
The input payload was invalid (e.g. not valid Base64).
- securityUpdateRequired → const BiometricError
-
A security update is required before biometrics can be used.
- notSupported → const BiometricError
-
Biometric authentication is not supported on this device/OS version.
- systemCanceled → const BiometricError
-
The system canceled the operation (e.g., app went to background).
- promptError → const BiometricError
-
Failed to show the biometric prompt (e.g., activity not available).
- keyAlreadyExists → const BiometricError
-
A key with the specified alias already exists and failIfExists was set.
- fallbackSelected → const BiometricError
-
The user selected a custom fallback option instead of authenticating.
Android 15+ onlyCheckselectedFallbackIndexandselectedFallbackTexton the result object to determine which option was selected. - passcodeNotSet → const BiometricError
-
The device does not have a screen lock (PIN, pattern, password, or passcode) configured.
A screen lock is a prerequisite for biometric enrollment and for hardware-backed key storage on all platforms:
- iOS/macOS: Maps from
kLAErrorPasscodeNotSet. Can surface during any operation that requires Secure Enclave access (key creation, signing, decryption, and simple prompt). - Android: Maps from
ERROR_NO_DEVICE_CREDENTIAL(cause code 14). Only surfaces whenallowDeviceCredentials: trueis set; for biometric-only flows Android reports notAvailable or notEnrolled instead. - Windows: Not applicable — Windows Hello manages its own credential requirements.
Use BiometricSignatureApi.isDeviceLockSet as a proactive precondition check before attempting operations. This error is the reactive counterpart when the check is skipped or the user removes their screen lock between the check and the operation.
Migration from 11.0.x → 11.1.0: On Android,
ERROR_NO_DEVICE_CREDENTIAL(cause code 14) was previously mapped to notAvailable. Consumers that were pattern-matching on notAvailable to drive a "no screen lock" UX should migrate to passcodeNotSet. iOS/macOS mapping ofkLAErrorPasscodeNotSetchanged in the same release. - iOS/macOS: Maps from
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- 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<
BiometricError> - A constant List of the values in this enum, in order of their declaration.