smart_liveliness_detection
0.4.0, released today by demola.dev
Flutter plugin that verifies a real person is in front of the camera using liveness challenges and anti‑spoofing checks.
What it does
It runs a live camera feed and asks the user to perform random challenges such as blinking, smiling, or head turns. The package evaluates face quality, detects spoofing (screen glare, motion correlation, TrueDepth) and can generate a privacy‑preserving biometric template.
AI-written summary of version 0.4.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- high‑security authentication requiring live‑person verification
- anti‑fraud flows that need to ensure a real user is present
- apps that can request camera and sensor permissions on Android/iOS
Skip it when
- targeting web or desktop platforms
- projects with strict size constraints due to heavy ML dependencies
- simple photo capture without liveness verification
Strengths
- 13 animated UI styles and full theming support
- Multiple anti‑spoofing techniques (gyroscope, screen flash, TrueDepth)
- Voice guidance for accessibility
- Highly customizable challenge sequence
Weaknesses
- Only works on Android and iOS
- Requires Flutter 3.47+ and Dart 3.13+, raising the minimum SDK
- Adds several heavy native dependencies (camera, ML Kit, sensors)
Setup
- Kind
- Plugin (native code)
- Effort
- Medium
- Code generation
- No
- Direct dependencies
- 9
Add CAMERA permission to AndroidManifest.xml; add NSCameraUsageDescription to iOS Info.plist; enable Swift Package Manager (flutter config --enable-swift-package-manager) for iOS; include TTS query in Android <queries> if using voice guidance; ensure device has TrueDepth camera for 3D depth detection.
import 'package:camera/camera.dart';
import 'package:smart_liveliness_detection/smart_liveliness_detection.dart';
import 'package:flutter/material.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
final cameras = await availableCameras();
runApp(MaterialApp(home: Scaffold(body: LivenessDetectionScreen(cameras: cameras, onLivenessCompleted: (id, success, meta) { /* handle result */ })))));
}Alternatives
Packages that do the same job and could replace smart_liveliness_detection.
- camera_avfoundation
iOS implementation of the Flutter camera plugin providing preview, photo, and video capture.
83Compare - camera_android_camerax
Android camera implementation using CameraX library
91Compare - camera_extended
Extended camera plugin with native aspect ratio support for iOS and Android.
75Compare - camera_camera
Drop-in camera UI widget for taking photos with zoom, flash, and camera switching.
50Compare
Works with
Packages commonly used together with smart_liveliness_detection: ones it builds on, ones built on it, and its own family.
- uuidsmart_liveliness_detection depends on itGenerates and parses RFC‑4122/9562 UUIDs (v1‑v8) for Dart.
- image_pickersmart_liveliness_detection depends on itFlutter plugin for selecting images/videos from the gallery and capturing new ones via camera.
- material_uismart_liveliness_detection depends on itOfficial Flutter Material UI library implementing Google’s Material Design system.
- providersmart_liveliness_detection depends on itA lightweight wrapper around InheritedWidget for state management
- camerasmart_liveliness_detection depends on itFlutter plugin to preview, capture photos/video and stream camera images.
- sensors_plussmart_liveliness_detection depends on itFlutter plugin to access accelerometer, gyroscope, magnetometer, and barometer sensors.
- flutter_ttssmart_liveliness_detection depends on itA Flutter plugin for text-to-speech support across multiple platforms.
- google_mlkit_face_detectionsmart_liveliness_detection depends on itFlutter plugin to use Google's ML Kit Face Detection on iOS and Android.