authenticate static method
Authenticate the user with biometrics.
reason is the message shown to the user (e.g. "Scan to pay").
Implementation
static Future<bool> authenticate({
String reason = 'Please authenticate to proceed',
bool sticky = true,
bool biometricOnly = false,
}) async {
try {
return await _auth.authenticate(
localizedReason: reason,
options: AuthenticationOptions(
stickyAuth: sticky,
biometricOnly: biometricOnly,
),
);
} on PlatformException catch (e) {
// Log error using CleanLogger if available or print
print('Biometric Error: $e');
return false;
}
}