startSDKWithCustomSelector method
Future<BlusaltIdentityResultResponse>
startSDKWithCustomSelector(
- List<
BlusaltIdentityType> identityTypes
override
Implementation
@override
Future<BlusaltIdentityResultResponse> startSDKWithCustomSelector(
List<BlusaltIdentityType> identityTypes) async {
try {
final result = await methodChannel
.invokeMethod('startIdentityVerificationWithCustomSelector', {
'apiKey': _apiKey,
'appName': _appName,
'clientId': _clientID,
'isDev': _isDev,
'documentTypesValue':
identityTypes.map((e) => e.value.toLowerCase()).toList()
});
if (result != null) {
return BlusaltIdentityResultResponse.fromJson(json.decode(result),
identityResultType: BlusaltIdentityResultType.success);
} else {
return BlusaltIdentityResultResponse(
identityResultType: BlusaltIdentityResultType.error,
message: "Something went wrong");
}
} on PlatformException catch (exception) {
return BlusaltIdentityResultResponse(
identityResultType: BlusaltIdentityResultType.error,
exception: exception,
message: exception.message);
} catch (e) {
return BlusaltIdentityResultResponse(
identityResultType: BlusaltIdentityResultType.error,
message: e.toString());
}
}