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

Advanced facial liveness detection with anti-spoofing protection for Flutter apps. Includes enterprise-grade security features, customizable UI, and real-time challenge validation.

Facial Liveness Verification #

A comprehensive Flutter package for real-time facial liveness verification using advanced anti-spoofing techniques, challenge-based verification, and customizable UI components.

Features #

  • Real-time face detection using Google ML Kit
  • Advanced anti-spoofing protection with motion analysis
  • Interactive challenge system (smile, blink, head turns)
  • Customizable UI and theming for brand consistency
  • Comprehensive error handling with recovery options
  • Performance optimized for various device capabilities
  • Easy integration with callback-based API

Quick Start #

πŸš€ Ultra-Simple Integration (One-liner!) #

import 'package:facial_liveness_verification/facial_liveness_verification.dart';

// Just one function call - that's it!
await showLivenessCheck(
  context: context,
  onSuccess: (result) => print('User verified!'),
  onFailure: (error) => print('Verification failed'),
);

🎯 Simple Widget Integration #

SimpleLivenessWidget(
  onSuccess: (result) => print('Verified!'),
  onFailure: (error) => print('Failed!'),
)

βš™οΈ Advanced Configuration #

LivenessDetectionWidget(
  config: LivenessConfig.secure(),
  onLivenessDetected: (result) {
    print('Verification successful: ${result.confidenceScore}');
  },
  onError: (error) {
    print('Verification failed: ${error.message}');
  },
)

Built-in Configurations #

  • LivenessConfig.minimal() - Just smile! Perfect for quick onboarding
  • LivenessConfig.passive() - No user interaction needed, just look at camera
  • LivenessConfig.basic() - Quick verification with 2 challenges
  • LivenessConfig.secure() - Maximum security with all challenges
  • LivenessConfig.performance() - Optimized for low-end devices

Example App #

Run the example app to see the package in action:

cd example_app
flutter run

Configuration #

The package supports three built-in configurations:

  • LivenessConfig() - Default settings
  • LivenessConfig.basic() - Quick verification
  • LivenessConfig.secure() - Maximum security

iOS Setup #

Camera permissions are automatically configured. The package adds the required NSCameraUsageDescription to your iOS Info.plist.

Dependencies #

  • camera: ^0.11.2
  • google_mlkit_face_detection: ^0.13.1
  • permission_handler: ^12.0.1

License #

This project is licensed under the MIT License.

2
likes
140
points
108
downloads

Publisher

unverified uploader

Weekly Downloads

Advanced facial liveness detection with anti-spoofing protection for Flutter apps. Includes enterprise-grade security features, customizable UI, and real-time challenge validation.

Repository (GitHub)
View/report issues

Topics

#liveness-detection #face-recognition #anti-spoofing #biometric #security

Documentation

Documentation
API reference

License

MIT (license)

Dependencies

camera, flutter, google_mlkit_face_detection, permission_handler

More

Packages that depend on facial_liveness_verification