samviva 1.0.0 copy "samviva: ^1.0.0" to clipboard
samviva: ^1.0.0 copied to clipboard

A Flutter liveness detection library powered by Google ML Kit. Detect live users with configurable probability thresholds via active face challenges.

1.0.0 #

Initial release of samviva — a Flutter liveness detection library powered by Google ML Kit Face Detection.

Features #

  • Plug-and-play SamvivaLivenessView widget — drop into any Scaffold body; handles camera initialization, ML Kit processing, and challenge sequencing automatically
  • 4 active liveness challenges powered by Google ML Kit on-device face classification:
    • SamvivaLivenessChallenge.blink — detects eye closure via eyeOpenProbability
    • SamvivaLivenessChallenge.smile — detects smile via smilingProbability
    • SamvivaLivenessChallenge.turnLeft — detects head turn via headEulerAngleY
    • SamvivaLivenessChallenge.turnRight — detects head turn via headEulerAngleY
  • Configurable probability thresholds via SamvivaLivenessConfig:
    • blinkEyeClosedThreshold — lower = stricter blink detection
    • smileThreshold — higher = stricter smile detection
    • headTurnAngle — higher = must turn head further
    • challengeTimeout and totalTimeout for session control
  • Per-frame probability callback via onChallengeUpdate for logging and debugging
  • Optional success countdown via successCountdown — shows a 3…2…1 overlay before firing onSuccess
  • Full color theming via SamvivaLivenessTheme:
    • activeColor, errorColor, overlayColor
    • stepActiveColor, stepPendingColor, connectorIdleColor
  • Full text localisation via SamvivaLivenessLabels — override every user-visible string (step labels, instructions, state messages) for any language
  • Full text style customization via SamvivaLivenessTextStyles:
    • titleStyle, instructionStyle, stepLabelStyle, countdownStyle
  • Polished built-in UI:
    • Live camera preview with face oval cutout overlay
    • Sweeping progress arc around the oval
    • Animated step indicator with connector lines
    • Glassmorphism instruction card with animated text transitions
    • Pulse animation during active detection
    • Smooth color transitions between states
  • All processing is on-device — no server, no network call
  • Supports Android (NV21 image format) and iOS (BGRA8888 image format)
1
likes
160
points
177
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A Flutter liveness detection library powered by Google ML Kit. Detect live users with configurable probability thresholds via active face challenges.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

camera, flutter, google_mlkit_face_detection

More

Packages that depend on samviva