Flutter SDK
Biometry
Biometry's Flutter package that allows developers to integrate biometric authentication and verification into their Flutter applications using the Biometry API. This package simplifies the process of handling biometric data, making it easy to authenticate users securely.
Features
- Biometric Authentication: Easily authenticate users with biometric data such as voice and face recognition.
- Video Processing: Upload and process video files for biometric verification.
- API Integration: Seamlessly integrate with the Biometry API using a clean and straightforward Dart interface.
Getting Started
Prerequisites
Before you can start using the Biometry package, you need to:
- Obtain an API token from the Biometry service.
- Ensure your Flutter environment is set up. You can check the official Flutter installation guide for help.
Installation
Add biometry to your pubspec.yaml:
dependencies: biometry: path: ../biometry # Replace with the path or pub.dev version if publishedThen, run:
flutter pub getUsage
Initialize the Biometry SDK
Initialize the Biometry class with your API token:
import 'package:biometry/biometry.dart';
void main() { final biometry = Biometry.initialize(token: 'your-api-token');
// Now you can use the biometry instance to perform operations}Run a liveness check
API v2 splits the old processVideo call into liveness, faceVerify, and voiceVerify. Biometric operations identify the end user with an opaque userId (not a full name):
import 'dart:io';
void runLiveness(BiometryClient client) async { final bytes = await File('/path/to/your/video.mp4').readAsBytes();
final response = await client.verification.liveness(LivenessInput( userId: 'user-123', video: bytes, fileName: 'video.mp4', phrase: 'one two three four five six seven eight', ));
print('Decision: ${response.decision?.status}'); print('Request ID: ${response.requestId}');}More Information
For more information visit the api reference documentation.