BarcodeScannerConfig class

BarcodeScannerConfig contains all settings for the barcode scanner.

Constructors

BarcodeScannerConfig({required String license, String? templateFile, bool? isTorchButtonVisible, DSRect? scanRegion, bool? isBeepEnabled, bool? isVibrateEnabled, bool? isScanLaserVisible, bool? isAutoZoomEnabled, bool? isCloseButtonVisible, BigInt? barcodeFormats, EnumScanningMode? scanningMode, int? maxConsecutiveStableFramesToExit, int? expectedBarcodesCount, bool? isCameraToggleButtonVisible, EnumResolution? resolution})
Creates a new instance of BarcodeScannerConfig.

Properties

barcodeFormats BigInt?
Sets the barcode format(s) to read. This value is a combination of EnumBarcodeFormat flags that determine which barcode types to read. For example, to scan QR codes and OneD codes, set the value to EnumBarcodeFormat.qrCode | EnumBarcodeFormat.oned.
getter/setter pair
expectedBarcodesCount int?
Defines the expected number of barcodes to be scanned. The scanning process will automatically stop when the number of detected barcodes reaches this count.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
isAutoZoomEnabled bool?
Enables or disables the auto-zoom feature during scanning. When enabled (true), the scanner will automatically zoom in to improve barcode detection.
getter/setter pair
isBeepEnabled bool?
Specifies if a beep sound should be played when a barcode is successfully detected. Set to true to enable the beep sound, or false to disable it.
getter/setter pair
isCameraToggleButtonVisible bool?
Specifies whether the camera toggle button is displayed. This button lets users switch between available cameras (e.g., front and rear).
getter/setter pair
isCloseButtonVisible bool?
Determines whether the close button is visible on the scanner UI. This button allows users to exit the scanning interface.
getter/setter pair
isScanLaserVisible bool?
Determines if a scanning laser overlay is shown on the scanning screen. This visual aid (scan laser) helps indicate the scanning line during barcode detection.
getter/setter pair
isTorchButtonVisible bool?
Determines whether the torch (flashlight) button is visible in the scanning UI. Set to true to display the torch button, enabling users to turn the flashlight on/off.
getter/setter pair
isVibrateEnabled bool?
Specifies if a vibrate should be triggered when a barcode is successfully detected. Set to true to enable the vibrate, or false to disable it.
getter/setter pair
license String
The license key required to initialize the barcode reader.
getter/setter pair
maxConsecutiveStableFramesToExit int?
Specifies the maximum number of consecutive stable frames to process before exiting scanning. A "stable frame" is one where no new barcode is detected.
getter/setter pair
resolution ↔ EnumResolution?
Specifies the camera resolution for the barcode scanner. This value is defined by the EnumResolution and affects the quality of the camera feed.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scanningMode EnumScanningMode?
Sets the scanning mode for the barcode reader. The mode is defined by the EnumScanningMode and affects the scanning behavior.
getter/setter pair
scanRegion ↔ DSRect?
Defines the scanning area as a DSRect object where barcodes will be detected. Only the barcodes located within this defined region will be processed.
getter/setter pair
templateFile String?
Specifies the template configuration for the barcode scanner. This can be either a file path or a JSON string that defines various scanning parameters.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited