FaceAutoCaptureConfiguration constructor

FaceAutoCaptureConfiguration({
  1. CameraFacing cameraFacing = CameraFacing.front,
  2. CameraPreviewScaleType cameraPreviewScaleType = CameraPreviewScaleType.fit,
  3. bool isTorchEnabled = false,
  4. CaptureMode captureMode = CaptureMode.autoCapture,
  5. dynamic qualityAttributeThresholds,
  6. bool isPlaceholderVisible = true,
  7. bool isDetectionLayerVisible = false,
  8. 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 is false.
  • 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 is true.
  • isDetectionLayerVisible : Whether detection UI layer (tracking rectangle) is visible. Default value is false.
  • 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 is null.

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;
}