PasscodeBiometricAuthUICached class

Inheritance

Constructors

PasscodeBiometricAuthUICached({String prefix = 'PasscodeBiometricAuth', bool forceCreatePasscode = true, String title = 'Passcode', CheckConfig checkConfig = const CheckConfig(), CreateConfig createConfig = const CreateConfig(), RepeatConfig repeatConfig = const RepeatConfig(), double blurSigma = 15, void onMaxRetriesExceeded()?, Future<bool> onForgotPasscode(BuildContext context, PasscodeBiometricAuthUI authUI)?, HapticFeedbackType hapticFeedbackType = HapticFeedbackType.lightImpact, Widget dialogBuilder(BuildContext context, String title, Widget content, List<Widget>? actions)?})
This is the same as PasscodeBiometricAuthUI but with built-in onRead and onWrite using SharedPreferences.

Properties

blurSigma double
Blur sigma for the background.
finalinherited
checkConfig CheckConfig
Config for the check dialog.
finalinherited
createConfig CreateConfig
Config for the create dialog.
finalinherited
dialogBuilder Widget Function(BuildContext context, String title, Widget content, List<Widget>? actions)?
The AlertDialog will be used by default. If you want to modify the dialog, you can use this builder.
finalinherited
forceCreatePasscode bool
If this value is true, the app requests to create a passcode if it's unavailable. If false, the app only requests to create a passcode if the biometric authentication is unavailable in the device.
finalinherited
hapticFeedbackType → HapticFeedbackType
The vibration type when user types.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
isUseBiometric Future<bool>
Check whether the app is using biometric.
no setterinherited
onForgotPasscode Future<bool> Function(BuildContext context)?
This method is called when users tap the forgot your passcode button. We usually use a dialog to show the cautions when users want to reset their passcode. The passcode will be removed if this method returns true.
latefinalinherited
onMaxRetriesExceeded → void Function()?
This callback will be triggered when users reach the maximum number of retries.
finalinherited
onRead OnRead?
All configuration that needs to be read from the local database will be called through these methods.
finalinherited
onWrite OnWrite?
All configuration that needs to be write to the local database will be called through these methods.
finalinherited
prefix String
Prefix for saving to local database in OnRead and OnWrite.
finalinherited
repeatConfig RepeatConfig
Config for the repeat dialog.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sha256Passcode Future<String>
Get the current passcode in SHA256. There is no way to get the raw passcode.
no setterinherited
title String
Main title of all dialogs.
finalinherited

Methods

authenticate(BuildContext context, {bool? forceCreatePasscode, bool? isUseBiometric}) Future<bool>
This method will automatically handles both passcode and biometric authentications.
inherited
authenticateWithBiometric() Future<bool>
Manually authenticate via biometric authentication.
inherited
authenticateWithPasscode(BuildContext context) Future<bool>
Manually authenticate via passcode authentication.
inherited
changePasscode(BuildContext context) Future<bool>
Change the passcode.
inherited
isAvailablePasscode() FutureOr<bool>
Check whether the passcode is available.
inherited
isBiometricAvailable() Future<bool>
Check whether biometric authentication is available on the current device.
inherited
isPasscodeAuthenticated(String code) Future<bool>
Check whether the passcode code is correct.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removePasscode() Future<void>
Remove the current passcode.
inherited
toString() String
A string representation of this object.
inherited
useBiometric(bool isUse) Future<void>
Set the isUseBiometric value.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited