Last updated:
0 purchases
facetagr package
FaceTagr Flutter Package #
The FaceTagr Flutter package allows third-party teams to integrate face recognition capabilities into their applications. This package provides two primary functions: initialization (init) and face matching (fnFaceMatch).
Installation #
This will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get)
dependencies:
facetagr_package: ^1.0.16
copied to clipboard
Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.
Import it #
Now in your Dart code, you can use:
import 'package:facetagr_package/facetagr_package.dart';
import 'dart:io';
import 'package:image_picker/image_picker.dart';
copied to clipboard
Implementation init function #
final faceTagr = FaceTagr();
faceTagr.init(
apiURL: 'https://yourapiurl.com',
clientID: 'yourClientID',
externalID: 'yourExternalID',
hashcode: 'yourHashcode',
utcTime: DateTime.now().toUtc().toString(),
requestID: Uuid().v4(),
);
copied to clipboard
Implementation Face Matching function #
To perform face matching, call the fnFaceMatch method with a File object representing the image:
final picker = ImagePicker();
final pickedFile = await picker.getImage(source: ImageSource.camera);
if (pickedFile != null) {
File imageFile = File(pickedFile.path);
await faceTagr.fnFaceMatch(imageFile);
}
copied to clipboard
Implementation Logout function #
To logout and clear all stored tokens, call the fnLogout method:
await faceTagr.fnLogout();
copied to clipboard
Listening to Events #
You can listen to initialization and face match events using the provided streams:
faceTagr.initStream.listen((message) {
print('Init Event: $message');
});
faceTagr.faceMatchStream.listen((message) {
print('Face Match Event: $message');
});
copied to clipboard
License #
FaceTagr
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.