SDK Lifecycle
CafLivenessListener (Flutter)
Example Implementation
void _setupFaceLivenessListener(Stream<FaceLivenessEvent> stream) {
stream.listen((event) {
if (event is FaceLivenessEventConnecting) {
print('Connecting to FaceLiveness...');
} else if (event is FaceLivenessEventConnected) {
print('Connected to FaceLiveness.');
} else if (event is FaceLivenessEventClosed) {
print('SDK closed by the user.');
} else if (event is FaceLivenessEventSuccess) {
print('Success! SignedResponse: ${event.signedResponse}');
} else if (event is FaceLivenessEventFailure) {
print(
'Failure! Error type: ${event.errorType}, '
'Error description: ${event.errorDescription}',
);
}
});
}Last updated

