startEnrollment method

Future<(LivenessResponse, EnrollmentResponse?)> startEnrollment(
  1. EnrollmentConfig config, {
  2. LivenessNotificationCompletion? notificationCompletion,
  3. CameraSwitchCallback? cameraSwitchCallback,
})

Implementation

Future<(LivenessResponse, EnrollmentResponse?)> startEnrollment(
  EnrollmentConfig config, {
  LivenessNotificationCompletion? notificationCompletion,
  CameraSwitchCallback? cameraSwitchCallback,
}) async {
  _setLivenessNotificationCompletion(notificationCompletion);
  _setCameraSwitchCallback(cameraSwitchCallback);
  var response = _decode(await _bridge.invokeMethod(
    "startEnrollment",
    [config.toJson()],
  ));
  var lr = LivenessResponse.fromJson(response["livenessResponse"])!;
  var er = EnrollmentResponse.fromJson(response["enrollmentResponse"]);
  return (lr, er);
}