FaceCaptureConfig constructor

const FaceCaptureConfig({
  1. List<FacePoseStep>? steps,
  2. double straightYawTolerance = 8.0,
  3. double straightPitchTolerance = 8.0,
  4. double yawThreshold = 20.0,
  5. double pitchThreshold = 15.0,
  6. double smileThreshold = 0.7,
  7. Duration holdDuration = const Duration(milliseconds: 600),
  8. bool autoCapture = true,
  9. Color primaryColor = PrimaryColors.p500,
  10. Color successColor = const Color(0xFF34C759),
  11. Color errorColor = const Color(0xFFFF3B30),
  12. Color overlayBackgroundColor = const Color(0xFFFFFFFF),
  13. Widget overlayBuilder(
    1. BuildContext context,
    2. FaceCaptureState state
    )?,
  14. Widget instructionBuilder(
    1. BuildContext context,
    2. FacePoseStep step
    )?,
  15. Widget progressBuilder(
    1. BuildContext context,
    2. int completedSteps,
    3. int totalSteps
    )?,
  16. Widget captureButtonBuilder(
    1. BuildContext context,
    2. VoidCallback onCapture
    )?,
  17. Widget successBuilder(
    1. BuildContext context
    )?,
  18. Widget errorBuilder(
    1. BuildContext context,
    2. String message,
    3. VoidCallback onRetry
    )?,
})

Implementation

const FaceCaptureConfig({
  List<FacePoseStep>? steps,
  this.straightYawTolerance = 8.0,
  this.straightPitchTolerance = 8.0,
  this.yawThreshold = 20.0,
  this.pitchThreshold = 15.0,
  this.smileThreshold = 0.7,
  this.holdDuration = const Duration(milliseconds: 600),
  this.autoCapture = true,
  this.primaryColor = PrimaryColors.p500,
  this.successColor = const Color(0xFF34C759),
  this.errorColor = const Color(0xFFFF3B30),
  this.overlayBackgroundColor = const Color(0xFFFFFFFF),
  this.overlayBuilder,
  this.instructionBuilder,
  this.progressBuilder,
  this.captureButtonBuilder,
  this.successBuilder,
  this.errorBuilder,
}) : steps = steps ?? const [];