caf_sdk 1.0.0
caf_sdk: ^1.0.0 copied to clipboard
A Flutter plugin that provides native integration with the CAF (Combate à Fraude) SDK, enabling document detection, face liveness verification, and related UI components in Flutter applications.
Release Notes #
Changelog #
1.0.0 - 2025-10-27 #
Highlights
- First Flutter SDK Release: Complete Flutter implementation of the CAF SDK for identity verification
- Unified SDK: Single package containing all CAF modules (Face Liveness and Document Detector) with both core and UI variants
- Flutter-Native Integration: Seamless integration with Flutter's widget system and state management
- Cross-Platform Support: Full support for both Android and iOS platforms
- Type-Safe Configuration: Strongly typed Dart configuration classes for better development experience
Features
-
Module Configuration System:
caf-modules-config.json: Configuration file in project root to specify which modules to include- Available modules:
documentDetector: Enable/disable Document Detector modulefaceLiveness: Enable/disable Face Liveness moduledocumentDetectorUI: Enable/disable Document Detector UI modulefaceLivenessUI: Enable/disable Face Liveness UI module
- Example configuration:
{ "documentDetector": true, "faceLiveness": true, "documentDetectorUI": false, "faceLivenessUI": false }
-
Core SDK Features:
- CafSdk Class: Main SDK class for initialization and configuration
- Event Stream: Real-time event handling through Dart streams
- Module Management: Sequential execution of modules with configurable presentation order
- Error Handling: Comprehensive error types and failure handling
- Configuration Builder: Type-safe configuration using builder pattern
-
Face Liveness Module:
- Core Module:
CafFaceLivenessConfigurationfor programmatic control - UI Module:
CafFaceLivenessUIConfigurationwith customizable instruction screens - Features: Authentication URLs, certificate pinning, debug mode, retry attempts
- Customization: Instruction screens with images, titles, descriptions, and steps
- Core Module:
-
Document Detector Module:
- Core Module:
CafDocumentDetectorConfigurationfor programmatic control - UI Module:
CafDocumentDetectorUIConfigurationwith full UI customization - Document Types: Support for RG, CNH, Passport, RNE, CTPS, and more
- Upload Support: File upload with compression, format control, and size limits
- Proxy Configuration: Support for proxy servers with authentication
- Message Customization: Customizable user messages throughout the flow
- Core Module:
-
Advanced Configuration:
- Color Theming: Complete UI color customization through
CafColorConfiguration - Security Settings: Development flags, debug mode, and security controls
- Flow Control: Manual capture, timeouts, retry attempts, and popup controls
- Instruction Screens: Customizable instruction screens for both modules
- Color Theming: Complete UI color customization through
Technical Implementation
-
Flutter Integration:
- Method Channels: Native communication through Flutter's method channel system
- Stream-Based Events: Real-time event handling using Dart streams
- State Management: Proper lifecycle management with
StatefulWidgetsupport - Error Handling: Comprehensive error handling with typed exceptions
-
Platform Support:
- Android: Full support with ProGuard/R8 rules and Maven repository configuration
- iOS: Complete integration with CocoaPods and native iOS modules
- Permissions: Proper permission handling for camera and network access
-
Performance:
- Selective Module Loading: Only load enabled modules to optimize bundle size
- Memory Management: Proper resource cleanup and memory management
- Network Optimization: Efficient network communication with retry mechanisms
Installation and Setup
- Package Installation: Simple installation via
flutter pub add caf_sdk - Module Configuration: Easy module selection through JSON configuration file
- Platform Setup: Clear instructions for Android and iOS platform configuration
- Permission Management: Comprehensive permission setup for both platforms
Documentation
- Complete Examples: Full implementation examples for both basic and advanced usage
- Configuration Guide: Detailed configuration options for all modules
- Event Handling: Comprehensive event handling examples and patterns
- Error Reference: Complete error types and failure scenarios documentation
Breaking Changes
- First Release: This is the first release of the Flutter SDK, so there are no breaking changes from previous versions.
Known Issues
- iOS Simulator: Some features may not work properly in iOS Simulator due to camera limitations
- Android Emulator: Camera-dependent features require physical devices for testing
- Network Requirements: All modules require internet connectivity for proper operation