startLiveness method

Future<LivenessResponse> startLiveness({
  1. LivenessConfig? config,
  2. LivenessNotificationCompletion? notificationCompletion,
  3. CameraSwitchCallback? cameraSwitchCallback,
})

Implementation

Future<LivenessResponse> startLiveness({
  LivenessConfig? config,
  LivenessNotificationCompletion? notificationCompletion,
  CameraSwitchCallback? cameraSwitchCallback,
}) async {
  _setLivenessNotificationCompletion(notificationCompletion);
  _setCameraSwitchCallback(cameraSwitchCallback);
  var response = await _bridge.invokeMethod(
    "startLiveness",
    [config?.toJson()],
  );
  return LivenessResponse.fromJson(_decode(response))!;
}