FaceLivenessView constructor

const FaceLivenessView({
  1. Key? key,
  2. ValueChanged<double>? onProgress,
  3. ValueChanged<File>? onCapture,
  4. ValueChanged<File>? onImageCapture,
  5. double targetYawSpan = 65.0,
  6. int timeoutMillis = 15000,
  7. int minCompletionTimeMillis = 4000,
  8. double minFaceSize = 0.20,
  9. int maxMissedFrames = 5,
  10. bool requireBidirectionalMovement = true,
  11. bool enablePitchDetection = true,
  12. int captureDelayMillis = 1500,
})

Implementation

const FaceLivenessView({
  super.key,
  this.onProgress,
  this.onCapture,
  this.onImageCapture,
  this.targetYawSpan = 65.0, // 65° for easier detection
  this.timeoutMillis = 15000, // 15 seconds timeout
  this.minCompletionTimeMillis = 4000, // Must take at least 4 seconds
  this.minFaceSize = 0.20, // Face must cover 20% of frame area (closer)
  this.maxMissedFrames = 5, // Allow max 5 consecutive missed frames
  this.requireBidirectionalMovement =
      true, // Require both left & right movement
  this.enablePitchDetection = true, // Enable up/down movement detection
  this.captureDelayMillis = 1500, // 1.5 second delay after completion
});