AuthenticatorWidget class
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.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- AuthenticatorWidget
Constructors
- AuthenticatorWidget({Key? key, required Authenticator authenticator, required Widget child, required LockScreenBuilder lockScreenBuilder, required String userFacingBiometricAuthenticationMessage, required PinInputBuilder inputNodeBuilder, SplashScreenBuilder? splashScreenBuilder, Duration splashScreenDuration = Duration.zero, bool hideAppContent = true, String? iosImageAsset})
-
const
Properties
- authenticator → Authenticator
-
The app's Authenticator. Make sure there's only one per app, otherwise
the locking functionality might not work reliably
final
- child → Widget
-
The part of the application that should be locked behind the pin screen
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hideAppContent → bool
-
If true, hides the app thumbnail from App Switcher. On iOS it displays either the asset
passed as iosImageAsset or a black or white screen (depending on whether the phone is in dark or
light mode) if iosImageAsset is
null
. On AndroidLayoutParams.FLAG_SECURE
is used, resulting in a black screen instead of thumbnail.final - inputNodeBuilder → PinInputBuilder
-
Describes what an individual pin input field is going to look like, given its
position (
index
) and its InputFieldStatefinal - iosImageAsset → String?
-
iOS only! Asset to display when the app is in App Switcher and hideAppContent is
true
. Ifnull
, a black or white screen will be displayed instead (depending on whether the phone is in dark or light mode). Ignored on Android.final - key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- lockScreenBuilder → LockScreenBuilder
-
Describes what the lock screen should look like, given the LockScreenConfiguration.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- splashScreenBuilder → SplashScreenBuilder?
-
Optional description of the splash screen. This should be used if you deliberately want
to delay the appearance of the lock screen so that your users could see the splash screen.
It only adds a Dart-side "splash", the native splash screens need to be implemented
manually in your app.
final
- splashScreenDuration → Duration
-
Optional duration for which to delay the appearance of the lock screen.
You shouldn't be adding unecessary delays to your application, but sometimes
the designs require it :/
final
- userFacingBiometricAuthenticationMessage → String
-
The message that the user sees in a native dialog while attempting to unlock
the app using biometric authentication
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< AuthenticatorWidget> -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of
DiagnosticsNode
objects describing this node's children.inherited -
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited