didAuthenticate static method
Implementation
static Future<bool> didAuthenticate(String title) async {
try {
final canAuthenticate = await canAuthenticateWithBiometrics();
if (!canAuthenticate) return false;
final bool didAuthenticate = await _authentication.authenticate(
localizedReason: title,
biometricOnly: true,
persistAcrossBackgrounding: true,
authMessages: const <AuthMessages>[
AndroidAuthMessages(
signInTitle: 'Authentication Required',
cancelButton: 'Cancel',
signInHint: 'Verify identity',
),
IOSAuthMessages(cancelButton: 'Cancel'),
],
);
return didAuthenticate;
} catch (e) {
return false;
}
}