ultimate_liveliness_detector 1.0.1 copy "ultimate_liveliness_detector: ^1.0.1" to clipboard
ultimate_liveliness_detector: ^1.0.1 copied to clipboard

A Flutter plugin for face liveness detection with configurable tasks (Smile, Blink, Motion). Uses ML Kit for face detection.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:ultimate_liveliness_detector/liveness_detection.dart';

void main() {
  WidgetsFlutterBinding.ensureInitialized();
  runApp(const ExampleApp());
}

class ExampleApp extends StatelessWidget {
  const ExampleApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Liveness Detection Example',
      debugShowCheckedModeBanner: false,
      theme: ThemeData(primarySwatch: Colors.teal, useMaterial3: true),
      home: const HomePage(),
    );
  }
}

class HomePage extends StatelessWidget {
  const HomePage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('Liveness Detection Example')),
      body: Center(
        child: ElevatedButton(
          onPressed: () => _startVerification(context),
          child: const Text('Start Liveness Verification'),
        ),
      ),
    );
  }

  void _startVerification(BuildContext context) {
    Navigator.push(
      context,
      MaterialPageRoute(
        builder: (context) => LivenessDetection(
          config: LivenessConfig(
            enableSmile: true,
            enableBlink: true,
            enableMotion: true,
            requiredDetections: 10,
            requiredBlinks: 3,
            showDefaultSuccessScreen: true,
            onSuccess: (imagePath) {
              debugPrint('Liveness verification successful! Image: $imagePath');
            },
            onCancel: () {
              Navigator.pop(context);
            },
          ),
        ),
      ),
    );
  }
}
3
likes
130
points
15
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A Flutter plugin for face liveness detection with configurable tasks (Smile, Blink, Motion). Uses ML Kit for face detection.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter, permission_handler

More

Packages that depend on ultimate_liveliness_detector

Packages that implement ultimate_liveliness_detector