facetagr_package 1.0.2
facetagr_package: ^1.0.2 copied to clipboard
The FaceTagr Flutter package enables developers to integrate advanced face recognition capabilities into their Flutter applications effortlessly. With straightforward initialization and face matching [...]
FaceTagr Flutter Package #
Overview #
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).
Initialization #
The init function initializes the FaceTagr SDK with the required credentials. The return values are broadcast. Parameters ClientID: A unique identifier provided by the FaceTagr team for each customer. APIURL: The base URL of the API endpoints. It is common for all customers using shared infrastructure and may differ for customers set up with dedicated infrastructure. ExternalID: The EmployeeID or the masked ID of the user of the app. This should be the same value used during the face registration of this employee. Return Values {'StatusCode': 100, 'StatusMessage': "Success"} {'StatusCode': 401, 'StatusMessage': "Invalid credentials"} {'StatusCode': 400, 'StatusMessage': "Oops! Something went wrong! Please try again!"}
Face Matching #
The fnFaceMatch function verifies a person's face in the provided image. The camera view will return a temporary file name for the photo taken. The name of this file is passed into this method as imagePath. The return values are broadcast. Parameters imagePath: A string value that has the path returned from the camera view of the image file to be verified. Return Values {'StatusCode': 100, 'StatusMessage': "Face verified successfully."} {'StatusCode': 101, 'StatusMessage': "Face is not matching."} {'StatusCode': 400, 'StatusMessage': "No face found."} {'StatusCode': 401, 'StatusMessage': "Face size is less than the minimum required size."} {'StatusCode': 402, 'StatusMessage': "Face is blurred and/or not clear"} {'StatusCode': 403, 'StatusMessage': "Face should be facing the camera straight."} {'StatusCode': 404, 'StatusMessage': "Face is not live. Spoofing detected."} {'StatusCode': 500, 'StatusMessage': "Oops! Something went wrong! Please try again!"} {'StatusCode': 501, 'StatusMessage': "Face verification failed. Server error."} {'StatusCode': 502, 'StatusMessage': "Servers not reachable."}
Error Handling #
Each function returns a StatusCode and a StatusMessage. Handle these codes appropriately to ensure a smooth user experience. For example, prompt the user to try again if a server error occurs or if the face is not detected clearly.