fromJson static method
Implementation
@visibleForTesting
static LivenessConfig? fromJson(jsonObject) {
if (jsonObject == null) return null;
var result = LivenessConfig();
result.copyright = jsonObject["copyright"];
result.cameraSwitchEnabled = jsonObject["cameraSwitchEnabled"];
result.closeButtonEnabled = jsonObject["closeButtonEnabled"];
result.torchButtonEnabled = jsonObject["torchButtonEnabled"];
result.vibrateOnSteps = jsonObject["vibrateOnSteps"];
result.cameraPositionAndroid = jsonObject["cameraPositionAndroid"];
result.cameraPositionIOS =
CameraPosition.getByValue(jsonObject["cameraPositionIOS"])!;
result.screenOrientation =
ScreenOrientation.fromIntList(jsonObject["screenOrientation"])!;
result.locationTrackingEnabled = jsonObject["locationTrackingEnabled"];
result.attemptsCount = jsonObject["attemptsCount"];
result.recordingProcess =
RecordingProcess.getByValue(jsonObject["recordingProcess"])!;
result.livenessType = LivenessType.getByValue(jsonObject["livenessType"])!;
result.tag = jsonObject["tag"];
result.skipStep =
LivenessSkipStep.fromIntList(jsonObject["screenOrientation"])!;
result.metadata = jsonObject["metadata"];
return result;
}