startFaceRecon method
Future<String?>
startFaceRecon(
- String clientSessionKey,
- String sessionId,
- String fontColor,
- String backgroundColor,
- String environment,
- String audioConfiguration,
- bool showSuccessScreen,
- bool showInvalidTokenScreen,
- bool showIntroductionScreens,
- bool activeFaceLiveness,
- bool useValidation,
- String documentNumber,
override
Implementation
@override
Future<String?> startFaceRecon(
String clientSessionKey,
String sessionId,
String fontColor,
String backgroundColor,
String environment,
String audioConfiguration,
bool showSuccessScreen,
bool showInvalidTokenScreen,
bool showIntroductionScreens,
bool activeFaceLiveness,
bool useValidation,
String documentNumber,
) async {
try {
return await methodChannel.invokeMethod('startFaceRecon', {
'clientSessionKey': clientSessionKey,
'sessionId': sessionId,
'fontColor': fontColor,
'backgroundColor': backgroundColor,
'environment': environment,
'audioConfiguration': audioConfiguration,
'showSuccessScreen': showSuccessScreen,
'showInvalidTokenScreen': showInvalidTokenScreen,
'showIntroductionScreens': showIntroductionScreens,
'activeFaceLiveness': activeFaceLiveness,
'useValidation': useValidation,
'documentNumber': documentNumber,
});
} on PlatformException catch (e) {
final details = e.details as Map<Object?, Object?>?;
final statusCode = details?['status_code'] as int?;
final reason = details?['reason'] as String? ?? e.code;
final description = details?['description'] as String? ?? e.message ?? 'Unknown error';
throw FaceReconException(
statusCode: statusCode,
reason: reason,
description: description
);
}
}