fromJson method

dynamic fromJson(
  1. Map<String, dynamic> jsonObject
)

Allows you to deserialize object.

Implementation

fromJson(Map<String, dynamic> jsonObject) {
  _pictureOnBoundsReady = jsonObject["pictureOnBoundsReady"];
  _showTorchButton = jsonObject["showTorchButton"];
  _showCloseButton = jsonObject["showCloseButton"];
  _videoCaptureMotionControl = jsonObject["videoCaptureMotionControl"];
  _showCaptureButton = jsonObject["showCaptureButton"];
  _showChangeFrameButton = jsonObject["showChangeFrameButton"];
  _showSkipNextPageButton = jsonObject["showSkipNextPageButton"];
  _useAuthenticator = jsonObject["useAuthenticator"];
  _skipFocusingFrames = jsonObject["skipFocusingFrames"];
  _showCameraSwitchButton = jsonObject["showCameraSwitchButton"];
  _displayMetadata = jsonObject["displayMetadata"];
  _isZoomEnabled = jsonObject["isZoomEnabled"];
  _isCameraTorchCheckDisabled = jsonObject["isCameraTorchCheckDisabled"];
  _recordScanningProcess = jsonObject["recordScanningProcess"];
  _manualMultipageMode = jsonObject["manualMultipageMode"];
  _singleResult = jsonObject["singleResult"];

  _showCaptureButtonDelayFromDetect =
      jsonObject["showCaptureButtonDelayFromDetect"];
  _showCaptureButtonDelayFromStart =
      jsonObject["showCaptureButtonDelayFromStart"];
  _rfidTimeout = jsonObject["rfidTimeout"];
  _forcePagesCount = jsonObject["forcePagesCount"];
  _orientation = DocReaderOrientation.getByValue(jsonObject["orientation"]);
  _captureMode = CaptureMode.getByValue(jsonObject["captureMode"]);
  _cameraPosition = CameraPosition.getByValue(jsonObject["cameraPosition"]);

  _cameraFrame = DocReaderFrame.getByValue(jsonObject["cameraFrame"]);
  _btDeviceName = jsonObject["btDeviceName"];

  _zoomFactor = _toDouble(jsonObject["zoomFactor"]);
  _exposure = _toDouble(jsonObject["exposure"]);

  _excludedCamera2Models = jsonObject["excludedCamera2Models"] == null
      ? null
      : List<String>.from(jsonObject["excludedCamera2Models"]);

  _cameraResolutionAndroid = CameraSize.fromJson(jsonObject["cameraSize"]);
  _cameraResolutionIOS =
      CaptureSessionPreset.getByValue(jsonObject["videoSessionPreset"]);

  return this;
}