ScanbotCameraController constructor
ScanbotCameraController({
- required int viewId,
- required dynamic onCameraReady()?,
- dynamic onPictureTaken()?,
- dynamic onHeavyOperationProcessing()?,
- Future onMethodCall(
- MethodCall methodCall
- LiveDetector? detector,
- 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();
}