FaceAutoCaptureConfiguration constructor
FaceAutoCaptureConfiguration({
- CameraFacing cameraFacing = CameraFacing.front,
- CameraPreviewScaleType cameraPreviewScaleType = CameraPreviewScaleType.fit,
- bool isTorchEnabled = false,
- CaptureMode captureMode = CaptureMode.autoCapture,
- dynamic qualityAttributeThresholds,
- bool isPlaceholderVisible = true,
- bool isDetectionLayerVisible = false,
- String? sessionToken,
Create configuration for the Face Auto Capture UI component.
Properties:
cameraFacing
: Front or back camera facing. Default value is CameraFacing.front.cameraPreviewScaleType
: The camera preview scale type. Default value is CameraPreviewScaleType.fit.isTorchEnabled
: Whether torch is enabled during the process. If the camera doesn't have a flash unit, then this setting will be ignored. Default value isfalse
.captureMode
: Capture mode. Default value is CaptureMode.autoCapture.qualityAttributeThresholds
: Quality attribute thresholds. Default value is QualityAttributeThresholdPresets.standard.isPlaceholderVisible
: Whether placeholder for the face is visible. Default value istrue
.isDetectionLayerVisible
: Whether detection UI layer (tracking rectangle) is visible. Default value isfalse
.sessionToken
: Session token provided by DIS (Digital Identity Service). Set the session token if the result should be posted to DIS for evaluation. Default value isnull
.
Implementation
FaceAutoCaptureConfiguration({
CameraFacing cameraFacing = CameraFacing.front,
CameraPreviewScaleType cameraPreviewScaleType = CameraPreviewScaleType.fit,
bool isTorchEnabled = false,
this.captureMode = CaptureMode.autoCapture,
qualityAttributeThresholds,
this.isPlaceholderVisible = true,
this.isDetectionLayerVisible = false,
this.sessionToken,
}) {
_cameraConfiguration = CameraConfiguration(
facing: cameraFacing,
previewScaleType: cameraPreviewScaleType,
isTorchEnabled: isTorchEnabled,
);
this.qualityAttributeThresholds =
qualityAttributeThresholds ?? QualityAttributeThresholdPresets.standard;
}