Face Session Flow

Add the following code at the start-up of your application to initialise the SDK:

import 'package:uqudosdk_flutter/UqudoIdPlugin.dart';
import 'package:uqudosdk_flutter/uqudosdk_flutter.dart';
....
UqudoIdPlugin.init();
....

Use the below method for setting the locale of the application:

...
UqudoIdPlugin.setLocale(<your locale eg. en, ar etc.>);
...

Below you can find an example on how to initiate the face session process:

import 'package:uqudosdk_flutter/UqudoIdPlugin.dart';
import 'package:uqudosdk_flutter/uqudosdk_flutter.dart';
...

String result;
var token = "<please put your token here>";
try {
   var faceSessionConfiguration = new FaceSessionConfigurationBuilder()
	.setToken(token)
	.setSessionId("<your session identifier>")
      .setAppearanceMode(AppearanceMode.SYSTEM)
	.build();
   result = await UqudoIdPlugin.faceSession(faceSessionConfiguration);
} catch (error) {
}

In order to evaluate all the possible options please refer to section Face Session Flow. The JS interface is the porting of the JAVA one. In addition you can check UqudoIdPlugin.dart inside the plugin folder or directly from your IDE.

If successful, the response is a JSON Web Signature (JWS). Please refer to section "SDK result" for further details.

In case of a failure, the callback returns the following object:

Last updated