A widget that controls the setup of local authentication.
The builders passed as parameters to this widget describe what the UI
should look like at each step of the setup.
AuthenticationSetupWidget takes care of invoking appropriate builders
so that the app only takes care of what the setup should look like,
while the package takes care of the logic behind it.
Root widget of the part of the app that needs to be protected by the pin.
Takes the app's Authenticator as a parameter and makes sure that a lock
screen is shown as a non-dismissable overlay when the app should be locked.
Provides information necessary to draw the screen through which the user can disable the pin that
they have already set up before. It requires the correct pin to be entered in order to disable it.
Used to store values between sessions. pin_lock comes with SharedPreferences
implementation out of the box, but it is possible to provide your own implementation (e.g., using encrypted storage library
instead) by implementing LocalAuthenticationRepository interface and passing it to Authenticator.instance()
Keeps track of the lock state of the app while it's active.
It allows registering callbacks that will get triggered when the
app is locked/unlocked (e.g., for analytics purposes)
Provides information needed to draw the Lock Screen, such as the pin input widget
that needs to be placed on the LockScreen and available biometric methods that
can be used to draw a correct icon on biometric authentication button
Provides information necessary to draw a screen with
the overview of the current state of local authentication (e.g.,
whether pin is enabled and whether the device has biometric
authentication capabilities), as well as the callbacks used to make
the screen interactive (e.g., requesting password change)
A hash of the pin. Unlike Pin, PinHash is retrieved from
local storage and has no direct contact with the plaintext version
of the pin. It's used to compare hash values of newly entered Pin
and the one from local storage.
Gives an interface to which pin input widgets should conform
You decide what the input widgets should look like, based on the InputFieldState
and the position (index) of the field. Input fields will be drawn in a Row