smart_selfie_capture library

Smart Selfie Capture - A comprehensive Flutter package for capturing selfies with advanced features including face validation, liveness checks, and real-time feedback.

Features

  • 🎯 Real-time Face Detection - Powered by Google ML Kit
  • 🔒 Three Liveness Check Modes - Blink, mouth open, or both
  • 📏 Advanced Face Validation - Size, orientation, eyes, and smile detection
  • 🎨 Fully Customizable UI - Colors, messages, instructions, and themes
  • ⚡ Instant Visual Feedback - Face overlay with corner brackets
  • 🌐 Cross-platform - iOS 15.5+ and Android 21+

Quick Start

import 'package:smart_selfie_capture/smart_selfie_capture.dart';

SelfieCaptureScreen(
  config: const SelfieConfig(
    title: 'Take a Selfie',
    enableLivenessCheck: true,
    livenessCheckType: LivenessCheckType.mouthOpen,
  ),
  onCaptureComplete: (SelfieResult result) {
    print('Image saved: ${result.imagePath}');
    print('Validated: ${result.isValidated}');
    print('Liveness passed: ${result.livenessCheckPassed}');
  },
)

Configuration

Use SelfieConfig to customize the capture behavior:

Validation Rules

Fine-tune face validation with ValidationRules:

Result Handling

The SelfieResult object provides:

Platform Requirements

  • iOS: 15.5+
  • Android: API 21+ (Android 5.0)
  • Camera permissions must be granted before use

For detailed documentation, see:

Classes

SelfieCaptureScreen
A screen that captures selfies with face validation and liveness checks.
SelfieConfig
Configuration for the selfie capture process.
SelfieResult
Result of a selfie capture operation.
ValidationRules
Rules for validating detected faces during selfie capture.

Enums

LivenessCheckType
Type of liveness check to perform.