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