Flutter Integration¶
Overview¶
The Face Capture SDK comes with a Flutter interface for integration. This chapter will outline the requirements for Flutter integration, how to operate the included developer demo, and which parts of the demo source code correspond to the integration tasks outlined in the Application Design chapter.
Integration Requirements¶
The Face Capture SDK requires Camera permissions.
Demo Operation¶
The Face Capture SDK comes with a small developer demo that is intended to show how various options work. The demo allows developers to rapidly test various combinations of settings to determine what they need to adjust to meet their own application’s requirements. The demo is not intended to resemble a finished product and provides the user with many options that should not be accessible to an end-user in a production environment. Source code for the demo is provided within the SDK installer package.
Home Screen¶
Settings Screen¶
Capture Screen¶
Result Screen¶
Demo Code¶
This section provides details regarding the Face Capture API and how it is used to implement an application.
Create a Face Capture Object¶
FaceCapture faceCaptureLibrary = FaceCapture();
Create a Workflow Object¶
WorkFlow faceCaptureWorkflow;
faceCaptureLibrary.workflowCreate(settingWorkflow);
Adjust Workflow Settings¶
faceCaptureLibrary.setProperty(WorkflowProperty.username, settingUsername);
faceCaptureLibrary.setProperty(WorkflowProperty.timeout, settingCaptureTimeout);
faceCaptureLibrary.setProperty(WorkflowProperty.profile, settingCaptureProfile);
Select a Camera¶
List cameras[];
cameras = faceCaptureLibrary.getCameraList(CameraPosition.front);
cameras[0].setOrientation(CameraOrientation.portrait);
Begin a Capture Session¶
faceCaptureLibrary.startCaptureSession(faceCaptureWorkflow, cameras[0]);
Stop a Capture Session¶
faceCaptureLibrary.stopCaptureSession();
Get the capture region¶
faceCaptureLibrary.captureSessionGetCaptureRegion();
Handle Capture Session State¶
faceCaptureLibrary.getCaptureSesssionState();
Handle Capture Session Images¶
faceCaptureState.getFrame();
Handle Capture Session Feedback¶
faceCaptureState.getFeedback();
Handle Capture Session Status Changes¶
faceCaptureState.getStatus();
Get the Server Package¶
faceCaptureLibrary.getServerPackage();
Get the Encrypted Server Package¶
faceCaptureLibrary.getEncryptedServerPackage();
Enable Autocapture¶
faceCaptureLibrary.captureSessionEnableAutocapture(true);