startFullIdentitySDK method
Future<BlusaltFullIdentityResultResponse?>
startFullIdentitySDK({
- required String apiKey,
- required String appName,
- required String clientId,
- required bool isDev,
- String? webhookUrl,
- String? reference,
- bool showLivenessResult = true,
- List<
DocumentType> ? documentTypeList, - int? timeoutDurationInSec,
override
Implementation
@override
Future<BlusaltFullIdentityResultResponse?> startFullIdentitySDK({
required String apiKey,
required String appName,
required String clientId,
required bool isDev,
String? webhookUrl,
String? reference,
bool showLivenessResult = true,
List<DocumentType>? documentTypeList,
int? timeoutDurationInSec,
}) async {
try {
final result = await methodChannel.invokeMethod('startFullIdentitySDK', {
'apiKey': apiKey,
'appName': appName,
'clientId': clientId,
'isDev': isDev,
'webhookUrl': webhookUrl,
'reference': reference,
'showLivenessResult': showLivenessResult,
'documentTypeList':
documentTypeList?.map((e) => e.name.toUpperCase()).toList(),
'timeoutDurationInSec': timeoutDurationInSec,
});
if (result != null) {
var response = json.decode(result);
return _parseFullIdentityResponse(response, reference);
} else {
return BlusaltFullIdentityResultResponse(
blusaltFullIdentityProcess:
BlusaltFullIdentityProcess.notImplemented,
message: "Something went wrong");
}
} on PlatformException catch (exception) {
return BlusaltFullIdentityResultResponse(
blusaltFullIdentityProcess: BlusaltFullIdentityProcess.notImplemented,
exception: exception,
message: exception.message,
code: exception.code);
} catch (e) {
return BlusaltFullIdentityResultResponse(
blusaltFullIdentityProcess: BlusaltFullIdentityProcess.notImplemented,
message: e.toString());
}
}