camera_package 0.0.6 copy "camera_package: ^0.0.6" to clipboard
camera_package: ^0.0.6 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:

✨ 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,
                batterySaverBrightness: false,
                showLogo: false,
                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}),
                    ),
                  );
                },
              )