startVerification method

Future<(LivenessResponse, VerificationResponse?)> startVerification(
  1. VerificationConfig config, {
  2. LivenessNotificationCompletion? notificationCompletion,
  3. CameraSwitchCallback? cameraSwitchCallback,
})

Implementation

Future<(LivenessResponse, VerificationResponse?)> startVerification(
  VerificationConfig config, {
  LivenessNotificationCompletion? notificationCompletion,
  CameraSwitchCallback? cameraSwitchCallback,
}) async {
  _setLivenessNotificationCompletion(notificationCompletion);
  _setCameraSwitchCallback(cameraSwitchCallback);
  var response = _decode(await _bridge.invokeMethod(
    "startVerification",
    [config.toJson()],
  ));
  var lr = LivenessResponse.fromJson(response["livenessResponse"])!;
  var vr = VerificationResponse.fromJson(response["verificationResponse"]);
  return (lr, vr);
}