MobileScannerController constructor
MobileScannerController({
- bool autoStart = true,
- Size? cameraResolution,
- DetectionSpeed detectionSpeed = DetectionSpeed.normal,
- int detectionTimeoutMs = 250,
- CameraFacing facing = CameraFacing.back,
- List<
BarcodeFormat> formats = const <BarcodeFormat>[], - bool returnImage = false,
- bool torchEnabled = false,
- bool useNewCameraSelector = false,
Construct a new MobileScannerController instance.
Implementation
MobileScannerController({
this.autoStart = true,
this.cameraResolution,
this.detectionSpeed = DetectionSpeed.normal,
int detectionTimeoutMs = 250,
this.facing = CameraFacing.back,
this.formats = const <BarcodeFormat>[],
this.returnImage = false,
this.torchEnabled = false,
this.useNewCameraSelector = false,
}) : detectionTimeoutMs =
detectionSpeed == DetectionSpeed.normal ? detectionTimeoutMs : 0,
assert(
detectionTimeoutMs >= 0,
'The detection timeout must be greater than or equal to 0.',
),
super(MobileScannerState.uninitialized(facing));