LocalAuthentication class

A Flutter plugin for authenticating the user identity locally.

Constructors

LocalAuthentication()
const

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

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

Static Properties

canCheckBiometrics Future<bool>
Returns true if device is capable of checking biometrics
no setter

Static Methods

authenticate({required String localizedReason, AndroidAuthMessages androidAuthStrings = const AndroidAuthMessages(), bool biometricOnly = true, IOSAuthMessages iOSAuthStrings = const IOSAuthMessages(), bool sensitiveTransaction = true, bool stickyAuth = false, bool useErrorDialogs = true}) Future<bool>
Authenticates the user with biometrics available on the device while also allowing the user to use device authentication - pin, pattern, passcode.
authenticateWithBiometrics({required String localizedReason, bool useErrorDialogs = true, bool stickyAuth = false, AndroidAuthMessages androidAuthStrings = const AndroidAuthMessages(), IOSAuthMessages iOSAuthStrings = const IOSAuthMessages(), bool sensitiveTransaction = true}) Future<bool>
The authenticateWithBiometrics method has been deprecated. Use authenticate with biometricOnly: true instead
getAvailableBiometrics() Future<List<BiometricType>>
Returns a list of enrolled biometrics
isDeviceSupported() Future<bool>
Returns true if device is capable of checking biometrics or is able to fail over to device credentials.
stopAuthentication() Future<bool>
Returns true if auth was cancelled successfully. This api only works for Android. Returns false if there was some error or no auth in progress.