fingerprint_sdk_flutter 0.0.10 copy "fingerprint_sdk_flutter: ^0.0.10" to clipboard
fingerprint_sdk_flutter: ^0.0.10 copied to clipboard

discontinuedreplaced by: biopassid_fingerprint_sdk
PlatformAndroidiOS

BioPass ID Fingerprint SDK Flutter plugin.

BioPass ID Fingerprint SDK Flutter #

Latest Version #

May 18, 2023 - [0.0.10]

Table of Contents #

Quick Start Guide #

First, you will need a license key to use the SDK. To get your license key contact us through our website BioPass ID. #

Check out our official documentation for more in depth information on BioPass ID.

1. Prerequisites: #

Android iOS
Support SDK 21+ iOS 13+
- A device with a camera
- License key
- Internet connection is required to verify the license

2. Installation #

First, add fingerprint_sdk_flutter as a dependency in your pubspec.yaml file.

Android #

Change the minimum Android sdk version to 21 (or higher) in your android/app/build.gradle file.

minSdkVersion 21

Change the compile Android sdk version to 31 (or higher) in your android/app/build.gradle file.

compileSdkVersion 31

iOS #

Requires iOS 13.0 or higher.

Add to the ios/Info.plist:

  • the key Privacy - Camera Usage Description and a usage description.

If editing Info.plist as text, add:

<key>NSCameraUsageDescription</key>
<string>Your camera usage description</string>

Then go into your project's ios folder and run pod install.

# Go into ios folder
$ cd ios

# Install dependencies
$ pod install

3. How to use #

To call Fingerprint in your Flutter project is as easy as follow:

import 'package:flutter/material.dart';
import 'package:fingerprint_sdk_flutter/fingerprint_sdk_flutter.dart';
import 'dart:typed_data';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Fingerprint Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const MyHomePage(),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key});

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  final config = FingerprintConfig(
    licenseKey: 'your-license-key',
    captureType: FingerprintCaptureType.LEFT_HAND_FINGERS,
    outputType: FingerprintOutputType.CAPTURE_AND_SEGMENTATION,
    nFingersToCapture: 4,
    showStatusView: true,
    showDistanceIndicatorView: true,
    showFingersIndicatorView: true,
  );

  IFingerprintCaptureListener listener() => FingerprintCaptureListener(
        onFingerCapture: (List<Uint8List> images) async {
          print('Demo App - onFingerCapture: ${images[0][0]}');
        },
        onCaptureCanceled: () async {
          print('Demo App: onCaptureCanceled');
        },
        onStatusChanged: (FingerprintCaptureState state) async {
          print('Demo App - onStatusChanged: $state');
        },
        onFingerDetected: (List<Rect> displayFingerRects) async {
          print('Demo App - onFingerDetected: $displayFingerRects');
        },
        onClassificationChanged: (String classif) async {
          print('Demo App - onClassificationChanged: $classif');
        },
      );

  void openCamera() async {
    await Fingerprint.buildCameraView(
      config: config,
      listener: listener(),
    );
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Fingerprint Demo'),
      ),
      body: Center(
        child: ElevatedButton(
          onPressed: openCamera,
          child: const Text('Capture Fingers'),
        ),
      ),
    );
  }
}

4. FingerCaptureListener #

You can set a custom listener to receive captured fingers as well as finger rectangles and monitor the current capture status, among other features. You can write you own listener following this example:

IFingerprintCaptureListener listener() => FingerprintCaptureListener(
        onFingerCapture: (List<Uint8List> images) async {
          print('onFingerCapture: $images');
        },
        onCaptureCanceled: () async {
          print('onCaptureCanceled');
        },
        onStatusChanged: (FingerprintCaptureState state) async {
          print('onStatusChanged: $state');
        },
        onFingerDetected: (List<Rect> displayFingerRects) async {
          print('onFingerDetected: $displayFingerRects');
        },
        onClassificationChanged: (String classif) async {
          print('onClassificationChanged: $classif');
        },
      );

FingerprintCaptureState (enum) #

Name
FingerprintCaptureState.NO_DETECTION
FingerprintCaptureState.MISSING_FINGERS
FingerprintCaptureState.TOO_CLOSE
FingerprintCaptureState.TOO_FAR
FingerprintCaptureState.OK
FingerprintCaptureState.STOPPED
FingerprintCaptureState.PROCESSING
FingerprintCaptureState.MODEL_NOT_FOUND

5. LicenseKey #

First, you will need a license key to use the SDK. To get your license key contact us through our website BioPass ID. #

To use Fingerprint Capture you need a license key. To set the license key needed is simple as setting another attribute. Simply doing:

final config = FingerprintConfig(licenseKey: 'your-license-key');

Configs #

FingerprintConfig #

Variable name Type Default value
licenseKey String ''
showStatusView bool true
showDistanceIndicatorView bool true
showFingersIndicatorView bool true
nFingersToCapture int 4
captureType FingerprintCaptureType FingerprintCaptureType.LEFT_HAND_FINGERS
outputType FingerprintOutputType FingerprintOutputType.CAPTURE_AND_SEGMENTATION

FingerprintCaptureType (enum) #

Name
FingerprintCaptureType.RIGHT_HAND_FINGERS
FingerprintCaptureType.LEFT_HAND_FINGERS
FingerprintCaptureType.THUMBS

FingerprintOutputType (enum) #

Name
FingerprintOutputType.ONLY_CAPTURE
FingerprintOutputType.CAPTURE_AND_SEGMENTATION

Changelog #

0.0.10 #

  • Documentation update;
  • Focus adjustments for Android.

0.0.9 #

  • Documentation update;
  • License functionality fix for iOS.

0.0.8 #

  • Documentation update.

0.0.7 #

  • Documentation update;
  • Improved license functionality for iOS.

0.0.6 #

  • Finger capture;
  • Fingers segmentation;
  • Parameterizable distance, status and fingers indicators.
  • Documentation update;
  • dlib bug fix;
  • New licensing feature;
  • Finger indicator fix.
1
likes
130
points
19
downloads

Publisher

verified publisherbiopassid.com

Weekly Downloads

BioPass ID Fingerprint SDK Flutter plugin.

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on fingerprint_sdk_flutter

Packages that implement fingerprint_sdk_flutter