authenticate abstract method
- required String localizedReason,
- Iterable<
IBiometricMessages> authMessages = const <IBiometricMessages>[IOSBiometricMessages(), AndroidBiometricMessages(), WindowsBiometricMessages()], - IBiometricOptions options = const IBiometricOptions(),
Authenticates the user with biometrics available on the device while also allowing the user to use device authentication - pin, pattern, passcode.
Returns true if the user successfully authenticated, false otherwise.
localizedReason
is the message to show to user while prompting them
for authentication. This is typically along the lines of: 'Authenticate
to access MyApp.'. This must not be empty.
Provide authMessages
if you want to
customize messages in the dialogs.
Provide options
for configuring further authentication related options.
Throws a PlatformException
if there were technical problems with local
authentication (e.g. lack of relevant hardware). This might throw
PlatformException
with error code otherOperatingSystem
on the iOS
simulator.
Implementation
Future<bool> authenticate({
required String localizedReason,
Iterable<IBiometricMessages> authMessages = const <IBiometricMessages>[
IOSBiometricMessages(),
AndroidBiometricMessages(),
WindowsBiometricMessages()
],
IBiometricOptions options = const IBiometricOptions(),
});