Seamless Liveness Detection in Flutter with Didit SDK
Implement robust liveness detection in your Flutter applications to prevent fraud and enhance security. Learn how Didit's SDK simplifies integration, offers comprehensive fraud prevention with active and passive liveness, and.

Effortless IntegrationDidit's Flutter SDK provides a streamlined and developer-friendly way to integrate advanced liveness detection into your mobile applications, supporting both iOS and Android platforms.
Advanced Fraud PreventionLeverage Didit's Passive & Active Liveness capabilities to accurately detect and thwart sophisticated spoofing attempts, including deepfakes and printed photos.
Comprehensive Liveness ReportingGain deep insights into each verification attempt with detailed reports, including confidence scores, media references, and specific risk warnings like
LIVENESS_FACE_ATTACK.Modular and AI-Native SolutionDidit offers a modular, AI-native identity platform with Free Core KYC, allowing businesses to compose robust verification workflows tailored to their needs without setup fees.
The Growing Need for Liveness Detection in Mobile Apps
In today's digital landscape, mobile applications are at the forefront of user interaction, from banking and e-commerce to social media and healthcare. As convenience increases, so does the risk of identity fraud. Bad actors are constantly developing new ways to bypass traditional security measures, making robust identity verification more critical than ever. One of the most sophisticated threats is presentation attack detection (PAD), commonly known as spoofing. This involves using photos, videos, masks, or even deepfakes to impersonate a legitimate user during a biometric verification process.
For Flutter developers building cross-platform applications, integrating advanced security features like liveness detection can be complex. It requires not only sophisticated AI and machine learning models but also seamless integration with native device capabilities. Without effective liveness detection, applications are vulnerable to account takeovers, fraudulent sign-ups, and compliance breaches. This is where solutions like Didit's Liveness Detection come into play, offering a powerful, yet easy-to-implement, defense against such threats.
Understanding Liveness Detection: Active vs. Passive
Liveness detection technologies are designed to determine if a presented biometric sample (e.g., a face) is from a living person or a spoofing attempt. There are generally two main approaches:
- Passive Liveness: This method works silently in the background, analyzing a single image or short video stream without requiring any specific actions from the user. It uses advanced AI to detect subtle cues like skin texture, reflections, micro-movements, and 3D depth to differentiate a live person from a static image, video, or mask. Passive liveness is highly user-friendly as it minimizes friction during the verification process. Didit's Passive Liveness is highly effective at catching sophisticated spoofing attempts while maintaining a smooth user experience.
- Active Liveness: This approach prompts the user to perform specific actions, such as turning their head, blinking, or speaking a phrase. These actions provide dynamic data that the system analyzes to confirm liveness. While potentially adding a small amount of user friction, active liveness offers an additional layer of security, making it even harder for fraudsters to succeed. Didit offers both Passive & Active Liveness to provide a comprehensive and flexible solution tailored to varying security requirements.
Combining both active and passive methods, as Didit does, provides a multi-layered defense strategy, ensuring maximum security against evolving fraud tactics. These methods are crucial for preventing deepfake attacks and other advanced spoofing techniques that are becoming increasingly prevalent.
Integrating Didit's Liveness Detection with Flutter SDK
Integrating robust liveness detection into your Flutter app doesn't have to be a daunting task. Didit's Flutter SDK is designed for developers, offering a clean API and native performance for both iOS (13.0+, NFC requires iOS 15+) and Android (API 23+) platforms. The process is straightforward, starting with adding the SDK to your project and then making a few API calls to initiate and manage the verification flow.
Key Steps for Integration:
- Install the SDK: Add
flutter pub add didit_sdkto your project and configure platform-specific settings for iOS and Android as detailed in Didit's documentation. - Create a Session: Your backend initiates a verification session with Didit's API, receiving a
session_token. This token securely links your user's verification attempt to your system. - Launch Liveness Check: Pass the
session_tokento the Flutter SDK, which handles the entire liveness capture flow, including presenting the camera interface and guiding the user through any active liveness prompts. - Receive Results: Once the liveness check is complete, the SDK returns the result to your Flutter app, which can then be forwarded to your backend for final processing.
Didit's modular architecture ensures that integrating liveness detection is a plug-and-play experience. You can easily combine it with other identity verification components like ID Verification or 1:1 Face Match to build comprehensive KYC workflows.
Interpreting Liveness Detection Reports and Warnings
Beyond simply providing a pass/fail result, Didit's Liveness Detection offers detailed reports that empower businesses to make informed decisions and understand potential risks. The liveness detection report is returned as a JSON object, providing a comprehensive overview of the verification attempt. Key sections include:
- Liveness Status: Indicates the overall verification outcome (Approved, Declined, In Review, Not Finished) and a confidence score. A higher score signifies greater certainty of liveness.
- Method Details: Specifies whether
ACTIVE_3D,FLASHING, orPASSIVEliveness was used. - Media References: Temporary URLs to captured images (
reference_image) and videos (video_url), crucial for manual review if needed. - Risk Assessment (Warnings): This is a critical section, providing an array of warnings that highlight potential security issues. Examples include
LIVENESS_FACE_ATTACK(indicating a spoofing attempt),LOW_LIVENESS_SCORE,MULTIPLE_FACES_DETECTED, orFACE_IN_BLOCKLIST. These warnings come with short and long descriptions to provide context. - Age Estimation: An optional field providing the estimated age, useful for applications requiring age verification.
Didit allows for configurable verification settings, enabling you to define thresholds for low liveness scores, duplicate faces, face quality, and luminance. For instance, you can set a 'Review threshold' for sessions with lower scores, routing them for manual inspection, or a 'Decline threshold' for automatic rejection. This granular control over risk management is essential for tailoring the security posture to your specific business needs and regulatory requirements.
How Didit Helps
Didit stands out as the premier solution for liveness detection in Flutter applications due to its AI-native, developer-first approach and comprehensive feature set. Our Passive & Active Liveness products are engineered to provide state-of-the-art fraud prevention, protecting your platform from sophisticated spoofing attacks, including deepfakes. The modular architecture means you can easily integrate liveness detection as a standalone component or combine it with other powerful tools like ID Verification, 1:1 Face Match, and NFC Verification for ePassports/eIDs to create a complete identity verification workflow tailored to your needs. Didit's robust reporting, including detailed warnings and configurable thresholds, gives you unparalleled control over your risk management strategy.
Furthermore, Didit offers Free Core KYC, allowing businesses to get started with essential identity verification without initial investment. Our pay-per-successful-check model and no setup fees ensure that you only pay for what you use, making advanced identity verification accessible to businesses of all sizes. By leveraging Didit, Flutter developers can build secure, compliant, and user-friendly applications that stand strong against evolving fraud threats.
Ready to Get Started?
Ready to see Didit in action? Get a free demo today.
Start verifying identities for free with Didit's free tier.