ScanbotCameraController constructor

ScanbotCameraController(
  1. {required int viewId,
  2. required dynamic onCameraReady(
    1. ScanbotCameraController
    )?,
  3. dynamic onPictureTaken(
    1. Page
    )?,
  4. dynamic onHeavyOperationProcessing(
    1. bool
    )?,
  5. Future onMethodCall(
    1. MethodCall methodCall
    )?,
  6. LiveDetector? detector,
  7. dynamic onCameraPreviewStarted(
      )?}
    )

    Implementation

    ScanbotCameraController({
      required this.viewId,
      required Function(ScanbotCameraController)? onCameraReady,
      Function(common.Page)? onPictureTaken,
      Function(bool)? onHeavyOperationProcessing,
      final Future<dynamic> Function(MethodCall methodCall)? onMethodCall,
      this.detector,
      this.onCameraPreviewStarted,
    }) {
      this._onHeavyOperationProcessing = onHeavyOperationProcessing;
      this._onCameraReady = onCameraReady;
      this._onPictureTaken = onPictureTaken;
      this._onMethodCall = onMethodCall;
      channelName = "scanbot_sdk_camera_$viewId";
      _cameraChannel = MethodChannel(channelName);
      _cameraChannel.setMethodCallHandler(_resultHandler);
      _onAttachDetector();
    }