Skip to main content

liveness_flutter 0.6.1 copy "liveness_flutter: ^0.6.1" to clipboard
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.

pub package License: MIT Platform No ML models Docs Status: beta

Blink. Smile. Turn left. Verified. βœ…

The default screen: tap Verify, blink, turn left and smile inside an oval, then Passed with 100% confidence
Out of the box β€” about 10 lines of code
A fully branded account-upgrade flow: account home, intro, a face check in a circle with nod and blink steps, then verified
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:skills from 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.

1
likes
150
points
730
downloads

Documentation

Documentation
API reference

Publisher

verified publisherhenryifebunandu.dev

Weekly Downloads

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.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

camera, crypto, flutter, google_mlkit_face_detection, http, image, screen_brightness

More

Packages that depend on liveness_flutter