BiometricService class
Service for handling biometric authentication.
This service provides a platform-agnostic interface for biometric
authentication (Face ID, Touch ID, Fingerprint). It uses the local_auth
package when available, or provides a fallback interface.
Example usage:
final service = BiometricService();
if (await service.isAvailable()) {
final authenticated = await service.authenticate();
if (authenticated) {
// Handle successful authentication
}
}
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
authenticate(
{String reason = 'Please authenticate to continue', bool useErrorDialogs = true, bool stickyAuth = true}) → Future< bool> - Authenticates the user using biometrics.
-
getAvailableBiometrics(
) → Future< List< BiometricType> > - Gets available biometric types on the device.
-
isAvailable(
) → Future< bool> - Whether biometric authentication is available on this device.
-
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