FaceLivenessView constructor
const
FaceLivenessView({
- Key? key,
- ValueChanged<
double> ? onProgress, - ValueChanged<
File> ? onCapture, - ValueChanged<
File> ? onImageCapture, - double targetYawSpan = 65.0,
- int timeoutMillis = 15000,
- int minCompletionTimeMillis = 4000,
- double minFaceSize = 0.20,
- int maxMissedFrames = 5,
- bool requireBidirectionalMovement = true,
- bool enablePitchDetection = true,
- 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
});