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

A Flutter plugin for face liveness detection with randomized challenges to verify real human presence through facial movements.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:face_liveness_verifier/face_liveness_verifier.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: const Text('Face Liveness Verifier')),
        body: Center(
          child: ElevatedButton(
            onPressed: () async {
              final path = await FaceLivenessVerifierPlugin.instance
                  .startLivenessDetection(
                    context: context,
                    config: LivenessConfig(
                      isEnableMaxBrightness: true,
                      durationLivenessVerify: 60,
                      showDurationUiText: false,
                      startWithInfoScreen: false,
                      customLabels: {
                        LivenessChallenge.blink: '👁️ Parpadea',
                        LivenessChallenge.lookLeft: '⬅️ Izquierda',
                        LivenessChallenge.lookRight: '➡️ Derecha',
                        LivenessChallenge.lookUp: '⬆️ Arriba',
                        LivenessChallenge.lookDown: '⬇️ Abajo',
                        LivenessChallenge.smile: '😀 Sonríe',
                      },
                    ),
                    isEnableSnackBar: true,
                    shuffleChallenges: true,
                    isDarkMode: false,
                    showCurrentChallenge: true,
                  );
              debugPrint('Captured image path: $path');
            },
            child: const Text('Start Liveness Detection'),
          ),
        ),
      ),
    );
  }
}
2
likes
130
points
37
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A Flutter plugin for face liveness detection with randomized challenges to verify real human presence through facial movements.

Repository (GitHub)

License

MIT (license)

Dependencies

camera, collection, flutter, google_mlkit_face_detection, image, path_provider, screen_brightness

More

Packages that depend on face_liveness_verifier

Packages that implement face_liveness_verifier