flutter_liveness_check 1.0.2 copy "flutter_liveness_check: ^1.0.2" to clipboard
flutter_liveness_check: ^1.0.2 copied to clipboard

A comprehensive Flutter package for face liveness detection with fully customizable UI, ML Kit integration, and advanced features like dashed borders, retry logic, and quality detection.

Changelog #

All notable changes to this project will be documented in this file.

1.0.0 - 2024-09-20 #

Added #

  • Comprehensive configuration system with LivenessCheckConfig
  • Type-safe error handling with LivenessCheckError enum
  • Complete AppBar customization through AppBarConfig
  • Advanced theming support with LivenessCheckTheme
  • Customizable callback system with LivenessCheckCallbacks
  • Localization support through LivenessCheckMessages
  • Behavioral configuration via LivenessCheckSettings
  • Back button visibility control with showBackButton parameter
  • Custom loading widget support
  • Custom bottom widget support
  • Dashed and solid circle border styles
  • Enhanced blur and lighting quality detection
  • Retry logic with configurable maximum attempts
  • Font family customization for all text elements
  • Success and fail asset replacement
  • Progress tracking with callback support
  • Enhanced error messages with technical details
  • Comprehensive test coverage for all components

Changed #

  • BREAKING: Replaced customHeader parameter with AppBarConfig for better control
  • BREAKING: Moved all styling options to LivenessCheckTheme
  • BREAKING: Centralized all text messages in LivenessCheckMessages
  • BREAKING: Moved behavioral settings to LivenessCheckSettings
  • Improved face detection accuracy with ML Kit integration
  • Enhanced camera initialization and error handling
  • Better memory management and resource disposal
  • Optimized image processing for better performance
  • Updated examples to demonstrate new configuration system

Fixed #

  • Camera permission handling on both iOS and Android
  • Image format compatibility across different devices
  • Memory leaks in camera and ML Kit operations
  • Face detection stability during head movement
  • Blink detection accuracy with false positive filtering
  • Quality detection thresholds for better user experience
  • AppBar back button behavior and customization
  • Widget lifecycle management and disposal
  • Test compatibility issues after API changes

Removed #

  • customHeader parameter (replaced with AppBarConfig)
  • Hardcoded styling options (moved to theme configuration)
  • Hardcoded text messages (moved to messages configuration)
  • Legacy error handling approach (replaced with enum-based system)

Developer Experience #

  • Added comprehensive documentation with usage examples
  • Created example applications demonstrating various configurations
  • Added troubleshooting guide and performance tips
  • Improved error messages for better debugging
  • Added development setup instructions
  • Created migration guide for breaking changes

Platform Support #

  • iOS 10.0+ with Metal support
  • Android API level 21+ (Android 5.0)
  • Flutter 3.0.0 or higher
  • Dart 2.17 or higher
  • Support for arm64-v8a, armeabi-v7a, x86_64 on Android
  • Support for arm64, x86_64 on iOS

[Unreleased] #

Planned #

  • Additional gesture detection options
  • Advanced anti-spoofing features
  • Integration with popular identity verification services
  • Enhanced accessibility features

Migration Guide #

From pre-1.0 to 1.0+ #

Replace customHeader with AppBarConfig

Before:

LivenessCheckConfig(
  customHeader: AppBar(
    title: Text('Custom Title'),
    backgroundColor: Colors.blue,
  ),
)

After:

LivenessCheckConfig(
  appBarConfig: AppBarConfig(
    title: 'Custom Title',
    backgroundColor: Colors.blue,
    showBackButton: true,
  ),
)

Update Error Handling

Before:

LivenessCheckCallbacks(
  onError: (String error) {
    print('Error: $error');
  },
)

After:

LivenessCheckCallbacks(
  onError: (String error) {
    print('Error: $error');
  },
  onErrorWithType: (LivenessCheckError errorType, String message) {
    switch (errorType) {
      case LivenessCheckError.cameraPermissionDenied:
        // Handle permission error
        break;
      case LivenessCheckError.noFaceDetected:
        // Handle no face error
        break;
      // ... handle other error types
    }
  },
)

Update Theme Configuration

Before:

// Styling was mixed with main config
LivenessCheckScreen(
  config: LivenessCheckConfig(
    // Various styling options scattered
  ),
)

After:

LivenessCheckScreen(
  config: LivenessCheckConfig(
    theme: LivenessCheckTheme(
      backgroundColor: Colors.white,
      primaryColor: Colors.blue,
      borderStyle: CircleBorderStyle.solid,
      // All styling centralized
    ),
    // Other configurations separated
  ),
)

1.0.1 - 2024-09-20 #

Update Readme


1.0.2 - 2024-10-01 #

add param Camera setting for CameraController

enum ResolutionPreset {
  low,       // 352x288 (CIF)
  medium,    // 720x480 (NTSC)
  high,      // 1280x720 (HD)
  veryHigh,  // 1920x1080 (Full HD)
  ultraHigh, // 3840x2160 (4K)
  max        // Highest available, varies by device
}
enum ImageFormatGroup {
  unknown,
  jpeg,     // Compressed, smaller, good for storage/sharing
  yuv420,   // Raw format, great for real-time processing (default)
  bgra8888, // iOS-friendly, raw format
}

CameraSettings(
    //ResolutionPreset
    this.resolutionPreset = ResolutionPreset.high,
    //controls microphone input
    this.enableAudio = false,
    //ImageFormatGroup
    this.imageFormatGroup,
)

Support #

3
likes
0
points
378
downloads

Publisher

unverified uploader

Weekly Downloads

A comprehensive Flutter package for face liveness detection with fully customizable UI, ML Kit integration, and advanced features like dashed borders, retry logic, and quality detection.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

camera, device_info_plus, flutter, google_mlkit_face_detection, image, path_provider, permission_handler

More

Packages that depend on flutter_liveness_check