liveness_flutter 0.6.1
liveness_flutter: ^0.6.1 copied to clipboard
Beta: Plug-and-play liveness detection for Flutter. Configure action sequences like blink and smile, capture images or video, and send verification results to your backend.
π‘οΈ Liveness Flutter #
Face liveness checks for Flutter β free, on-device, and built for your backend.
Blink. Smile. Turn left. Verified. β
![]() Out of the box β about 10 lines of code |
![]() Fully branded β your design |
π§ͺ Beta β tested on real Android and iOS devices; the API may still change before 1.0 (details). Anyone can open an issue.
Add a face liveness check to your Flutter app in a few lines. The user blinks, smiles or turns their head when asked; the package checks a live person did it, then hands you the result β and the photos, if you want them β to send wherever you want.
LivenessDetector(
config: const LivenessConfig(
actions: [LivenessAction.blink, LivenessAction.smile, LivenessAction.lookLeft],
shuffleActions: true, // a new order every time
capture: {CaptureType.images}, // photos your server can check
),
onResult: (result) {
if (result.success) sendToYourServer(result);
},
)
Everything runs on the phone. No cloud service. No license fees. No model downloads. No account.
Requirements: Flutter 3.38+ Β· Android 7.0+ (API 24) Β· iOS 15.5+
β¨ Why this package? #
| π― Proves a live person is there | The user does random actions β blink, smile, turn, nod, 13 to choose from β in a new order every time, so a photo or a pre-recorded video can't follow along. |
| π΅οΈ Catches common tricks on the phone | Frozen or injected camera feeds, an unnaturally still "face", a second or swapped face, bad lighting β plus an optional screen-flash test against replayed videos. No ML model to download. |
| πΈ Gives your server the evidence | A photo at the peak of each action (eyes shut for a blink), or video, with hashes and an optional server-issued challenge, so your backend can verify instead of trusting the phone. |
| π¨ Looks like your app | Theme every color and word, or replace the screen with your own design β see the branded fintech example. |
| πͺΆ Free and light | Pure Dart plus Google's on-device ML Kit. No per-check fees, no account, no server of ours. |
π Install #
dependencies:
liveness_flutter: ^0.6.0
Android: set minSdkVersion 24. iOS: set platform :ios, '15.5'
in ios/Podfile and add a camera description to ios/Runner/Info.plist
(without it the app crashes on camera use):
<key>NSCameraUsageDescription</key>
<string>Camera is used for liveness verification.</string>
Then follow Getting started: show the screen, read the result, send it to your server, in about 10 minutes.
π€ Using an AI coding agent? Run
dart run liveness_flutter:skillsfrom your app's root and the agent skills teach Claude Code, Codex, Cursor, Copilot, Gemini CLI and others how to do the integration and the backend checks.
π Documentation #
Everything lives on the docs site.
| You want to⦠| Read |
|---|---|
| Add a working check to your app | Getting started |
| See every example, or run one | Examples |
| Make it look like your app | Customization Β· Controller |
| Use it for KYC or anything with real consequences | Bind sessions to your server Β· Server verification |
| Capture photos, video or frames | Capture guide |
| Stop replayed videos | Color-flash challenge |
| Have an agent verify someone else | Assisted mode |
| Every field in the result | Result reference |
| Debug overlay, callbacks, test bench | Developer tools |
| Quick answers (offline? app size? masks?) | FAQ |
| Know the limits before shipping | Honest notes |
β οΈ Before you ship #
This is not certified liveness, and it doesn't detect masks or deepfakes on its own. All checks run on the phone, which a determined attacker controls, so for anything with money on the line have your server verify the upload and review the photos. The honest notes cover every rough edge and the setting that changes it.
π§ͺ Status: beta #
Tested on real Android and iOS devices, but the API may change before
1.0. A minor release (0.5 β 0.6) can include breaking changes; each one is
listed under Breaking in the CHANGELOG. Depend on
^0.6.0 and you'll only get compatible updates.
Found a bug? Have an idea? Open an issue β anyone can, and PRs are welcome too. π
Made with β€οΈ for developers who'd rather not pay per verification.

