camera_package 0.0.4 copy "camera_package: ^0.0.4" to clipboard
camera_package: ^0.0.4 copied to clipboard

Bio Camera

πŸ“· Generalized Camera Library #

A reusable Flutter camera component built with face detection and auto-capture capabilities, designed for easy integration and compatibility with modern Android and iOS versions.


πŸ› οΈ Dependencies #

This library uses the following packages:

    google_mlkit_face_detection: ^0.13.1
    camera: ^0.11.0
    device_info_plus: ^11.3.0
    permission_handler: ^12.0.0+1
    image: ^4.5.4
    flutter_svg_provider: ^1.0.7
    lottie: ^3.1.1
    device_preview: ^1.2.0
    screen_brightness: ^2.1.5  

✨ Features βœ… One-click image capture using a custom or default button πŸ€– Auto-capture functionality for seamless user experience πŸ”„ Supports front and back camera switching 🧠 Face detection using Google ML Kit πŸ“¦ Singleton pattern for optimized camera resource handling βš™οΈ Easy to plug and play in your existing project 🎯 Compatible with modern iOS & Android SDKs

πŸš€ Example Usage #

Use below mention function when you want to use this camera. #

import 'package:camera_package/camera_singleton/FaceDetectionController.dart'; import 'package:camera_package/camera_singleton/FaceDetectionView.dart';

Now use the FaceDetectionView widget inside your app: #

Import the package and use it in your Flutter App. #

import '../camera_singleton/FaceDetectionController.dart';
import '../camera_singleton/FaceDetectionView.dart';
import '../camera_singleton/Utills.dart';
import 'home_widget.dart';

FaceDetectionView(
                actionType: registration,
                screenTitle: title,
                defalutCam: camCall.Front,
                showCameraIcon: showButton,
                showSwitchCameraIcon: true,
                callWithNavigate: navigateFlag,
                autoClickCamera: autoClik,
                switchCameraButton: Positioned(
                  bottom: 30,
                  right: 20,
                  child: Center(
                    child: Icon(
                      size: 50,
                      Icons.refresh,
                      color: Colors.white,
                    ),
                  ),
                ),
                captureButton: SizedBox(
                  width: 200,
                  child: ButtonView(
                    text: "Click",
                    fontSize: 15.sp,
                    showIcon: false,
                    showLoader: true,
                  ),
                ),
                onFieldSubmitted: (value) {
                  Utills.printLogs("FaceImagePath $value");
                  Navigator.pushReplacement(
                    context,
                    MaterialPageRoute(
                      builder: (context) => HomeWidget(imagePath: value),
                      settings: RouteSettings(arguments: {"imagePath": value}),
                    ),
                  );
                },
              )