Authenticator class abstract

Mixed in types

Constructors

Authenticator()

Properties

hashCode int
The hash code for this object.
no setterinherited
lockAfterDuration Duration
Interval after which the app will become pin locked after entering the background
no setter
lockedOutDuration Duration
A duration for which the app will be locked after the number of times the pin is entered incorrectly exceeds maxTries
no setter
lockState Stream<LockState>
Emits a LockState event every time the state is changed
no setter
maxTries int
The number of times that a pin can be entered incorrectly, before the app stops accepting unlock attempts for lockedOutDuration
no setter
pinLength int
The expected lenght of the pin, used to draw the PinInputWidget
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
userId UserId
A string value used as a key for storing current user's preferences. Enables multiple users to use the app on the same device, while preserving unique pin values and preferences of the users regardless of logging in and out. If the app is expected to be used by only one user (i.e., there is no login/logout functionality) this value can be hardcoded (UserId('1'))
no setter

Methods

changePinCode({required Pin oldPin, required Pin newPin, required Pin newPinConfirmation}) Future<Either<LocalAuthFailure, Unit>>
Changes pin of user. Only happens if oldPin is correct and newPin matches newPinConfirmation
didChangeAccessibilityFeatures() → void
Called when the system changes the set of currently active accessibility features.
inherited
didChangeAppLifecycleState(AppLifecycleState state) → void
Called when the system puts the app in the background or returns the app to the foreground.
inherited
didChangeLocales(List<Locale>? locales) → void
Called when the system tells the app that the user's locale has changed. For example, if the user changes the system language settings.
inherited
didChangeMetrics() → void
Called when the application's dimensions change. For example, when a phone is rotated.
inherited
didChangePlatformBrightness() → void
Called when the platform brightness changes.
inherited
didChangeTextScaleFactor() → void
Called when the platform's text scale factor changes.
inherited
didHaveMemoryPressure() → void
Called when the system is running low on memory.
inherited
didPopRoute() Future<bool>
Called when the system tells the app to pop the current route, such as after a system back button press or back gesture.
inherited
didPushRoute(String route) Future<bool>
Called when the host tells the application to push a new route onto the navigator.
inherited
didPushRouteInformation(RouteInformation routeInformation) Future<bool>
Called when the host tells the application to push a new RouteInformation and a restoration state onto the router.
inherited
didRequestAppExit() Future<AppExitResponse>
Called when a request is received from the system to exit the application.
inherited
disableAuthenticationWithPin({required Pin pin, bool force = false}) Future<Either<LocalAuthFailure, Unit>>
Disables locking the app completely, including biometric authentication Only happens if provided pin is correct, or if force is true (which should be avoided)
disableBiometricAuthentication({bool requirePin = false, Pin? pin}) Future<Either<LocalAuthFailure, Unit>>
Disables biometric authentication. If requirePin is true, it is necessary to provide the correct pin before biometric authentication is disabled
enableBiometricAuthentication() Future<Either<LocalAuthFailure, Unit>>
Enables biometric authentication for user.
enablePinAuthentication({required Pin pin, required Pin confirmationPin}) Future<Either<LocalAuthFailure, Unit>>
Enables pin authentication, making sure that pin and confirmationPin match
getAvailableBiometricMethods() Future<List<BiometricMethod>>
BiometricMethods can be used to show the appropriate icons in the UI
getBiometricAuthenticationAvailability() Future<BiometricAvailability>
Checks whether biometric authentication is available on the device and whether the user has enabled it. If biometric auth is not available, Unavailable provides a reason
isCorrectPin({required Pin pin}) Future<bool>
Check if provided pin is correct.
isPinAuthenticationEnabled() Future<bool>
Returns true if the user has a pin set up. A pin has to be set up in order to enable biometric authentication
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
unlockWithBiometrics({required String userFacingExplanation}) Future<Either<LocalAuthFailure, Unit>>
Triggers the OS's biometric authentication and changes the lockState if successful
unlockWithPin({required Pin pin}) Future<Either<LocalAuthFailure, Unit>>
Make an attempt to unlock the app using provided pin. If the pin is correct, lockState will be changed and lock screen dismissed

Operators

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