AuthGraceOptions class
Configuration options for AuthGrace.
Pass an AuthGraceOptions instance to AuthGrace to control grace period length, authentication strictness, and platform-specific behaviour.
final auth = AuthGrace(
options: const AuthGraceOptions(
gracePeriodSeconds: 30,
reason: 'Authenticate to open',
),
);
Constructors
- AuthGraceOptions({int gracePeriodSeconds = 30, bool alwaysRequire = false, String reason = 'Authenticate to continue', bool allowDeviceCredential = true, bool persistAcrossBackgrounding = true, String keyName = 'com.authgrace.auth_grace_key'})
-
Creates an AuthGraceOptions with the given settings.
const
Properties
- allowDeviceCredential → bool
-
Whether to fall back to PIN, pattern or password when biometric
authentication is unavailable or fails.
final
- alwaysRequire → bool
-
When
true, the grace period is ignored and a biometric/PIN prompt is always shown — regardless of when the device was last unlocked.final - gracePeriodSeconds → int
-
The number of seconds after the last device unlock during which
authentication is skipped automatically.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- keyName → String
-
The name used for the underlying Android Keystore key.
final
- persistAcrossBackgrounding → bool
-
Whether the biometric prompt stays visible when the app is moved to the
background during authentication.
final
- reason → String
-
The localised message shown in the system biometric dialog.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
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