SmileLivenessWidget class final
Smile Liveness UI component (widget).
The widget with instructions for obtaining face data suitable for liveness evaluation.
Widget configuration
In order to configure the behaviour of SmileLivenessWidget, use SmileLivenessWidgetConfiguration and pass in to SmileLivenessWidget.new. This is a required parameter.
Control the widget and consume outputs
As soon as the widget is created, the onCreated callback is called with the SmileLivenessWidgetController parameter. Use the controller to control the Smile Liveness process.
To start the Smile Liveness process call the SmileLivenessWidgetController.start method. You can start the process any time.
When the Smile Liveness process finishes successfully, the result will be returned via the onFinished callback.
Call SmileLivenessWidgetController.start method again in case you need to start over the Smile Liveness process.
You can also call SmileLivenessWidgetController.start method to stop and start over ongoing process as well.
In case you want to stop the Smile Liveness process prematurely, call the SmileLivenessWidgetController.stop method.
UI Customization
IDV Flutter SDK is wrapper around the native Android and iOS SDKs. If you want to customize the appearance of the widget on the Android platform, refer to the Android UI customization for detailed instructions. If you want to customize the appearance of the widget on the iOS platform use iosStyle.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- SmileLivenessWidget
Constructors
- SmileLivenessWidget({Key? key, required SmileLivenessWidgetConfiguration configuration, IosSmileLivenessWidgetStyle iosStyle = const IosSmileLivenessWidgetStyle(), OnSmileLivenessCreatedCallback? onCreated, OnSmileLivenessFinishedCallback? onFinished, OnSmileLivenessNoCameraPermissionCallback? onNoCameraPermission, OnSmileLivenessCriticalFacePresenceLostCallback? onCriticalFacePresenceLost})
-
Create a new widget with the given
configuration,iosStyleand callbacks.const
Properties
- configuration → SmileLivenessWidgetConfiguration
-
Configuration of the Smile Liveness component.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- iosStyle → IosSmileLivenessWidgetStyle
-
Style of the Smile Liveness component. Default value is IosSmileLivenessWidgetStyle. Only valid for iOS, it is ignored on Android.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- onCreated → OnSmileLivenessCreatedCallback?
-
Called when the widget is created.
final
- onCriticalFacePresenceLost → OnSmileLivenessCriticalFacePresenceLostCallback?
-
If the face presence is lost after the neutral face expression image is captured.
If the face presence between the neutral and the smile face expression images is required, call
startmethod to restart the process. Otherwise the callback can be ignored. Called only once for the whole process.final - onFinished → OnSmileLivenessFinishedCallback?
-
Called only once for the whole process.
Once this callback is called, the whole process is considered to be over.
final
- onNoCameraPermission → OnSmileLivenessCriticalFacePresenceLostCallback?
-
Called when camera permission was not granted.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< StatefulWidget> -
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, int wrapWidth = 65}) → 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