OverviewConfiguration class
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)
Constructors
- OverviewConfiguration({required bool? isPinEnabled, required bool? isBiometricAuthAvailable, required bool? isBiometricAuthEnabled, required VoidCallback onTogglePin, required VoidCallback onPasswordChangeRequested, required bool isLoading, required VoidCallback onToggleBiometric, required LocalAuthFailure? error, required VoidCallback onRefresh})
-
const
Properties
- error → LocalAuthFailure?
-
Provides a reason for the error that occured, which makes it possible to display
an apporpriate message to the user
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isBiometricAuthAvailable → bool?
-
Whether the given device has biometric authentication capabilities. Used to potentially
not display biometric authentication information to users who can't make use of it.
Can be
null
if data is still being fetched, regardless of the value of isLoadingfinal - isBiometricAuthEnabled → bool?
-
Returns
true
only if both the user has opted in for the biometric authentication and the device has biometric authentication capabilities. Can benull
if data is still being retrieved, regardless of the value of isLoadingfinal - isLoading → bool
-
true
if pin authentication data is still being fetched from local storagefinal - isPinEnabled → bool?
-
Whether the user has set up pin authentication. Can be
null
if data is still loading, (i.e., when isLoading is true)final - onPasswordChangeRequested → VoidCallback
-
A callback notifying Authenticator that the user has requested a pin change.
Can be invoked manually, but it is intended to be passed as the
onClick
to a "change password" buttonfinal - onRefresh → VoidCallback
-
Optionally re-check the state of local authentication, e.g., by passing this callback
to the refresh function of pull-to-refres
final
- onToggleBiometric → VoidCallback
-
A callback notifying Authenticator that the user wants to enable or disable
biometric authentication. Can be passed as the
onClick
parameter to a "toggle biometrics button". Triggering this callback when isBiometricAuthAvailable results in an appropriate LocalAuthFailure errorfinal - onTogglePin → VoidCallback
-
A callback notifying Authenticator that the user has requested a change in
their pin settings (either to enable it if disabled, or vice versa).
Can be invoked manually, but it was originally intended to be
passed as
onClick
property to a button or a switch on the overview screenfinal -
props
→ List<
Object?> -
The list of properties that will be used to determine whether
two instances are equal.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stringify → bool?
-
If set to
true
, the toString method will be overridden to output this instance's props.no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited