ScannerOptions class

Configuration options controlling camera detection rate, ROI bounds, duplicate caching, auto-zoom, image enhancement, isolate multi-threading, and enterprise scanning parameters.

Constructors

ScannerOptions({ScanStrategy scanStrategy = ScanStrategy.continuous, ScanWindow? scanWindow = ScanWindow.centerReticle, int frameThrottleMs = 50, int targetFrameRate = 20, bool enableAdaptiveFrameSkipping = true, bool enablePauseOnStaticFrame = true, Duration duplicateTimeout = const Duration(milliseconds: 1000), bool enableDuplicateFilter = true, bool enableIsolateProcessing = true, bool enableImageEnhancement = true, bool enableBlurDetection = true, bool enableAutoBrightnessCheck = true, bool autoTorchInLowLight = false, double lowLightThreshold = 0.25, bool enableAutoZoom = true, bool autoResetZoomAfterScan = true, double autoZoomThreshold = 0.15, bool continuousAutofocus = true, bool enableMultiCodeDetection = true, int maxMultiCodeCount = 10, bool enableScanHistory = true, int maxHistorySize = 50, int? maxBatchCount, double minConfidence = 0.70, Rect? rectScanArea, List<String>? allowedFormats, bool enableSound = true, bool enableVibration = true, double torchLevel = 1.0, bool isFocusLocked = false})
Constructs a ScannerOptions instance.
const

Properties

allowedFormats List<String>?
Optional whitelist of allowed barcode format symbologies (e.g. 'QR_CODE', 'EAN_13', 'PDF417').
final
autoResetZoomAfterScan bool
Automatically reset digital zoom back to 1.0x after successful scan emission.
final
autoTorchInLowLight bool
Automatically switch flashlight on when ambient light drops below threshold.
final
autoZoomThreshold double
Code-to-viewport area ratio below which auto-zoom triggers (e.g., 0.15 = 15%).
final
continuousAutofocus bool
Whether continuous autofocus mode is enabled.
final
duplicateTimeout Duration
Timeout duration during which identical scanned payloads are ignored.
final
enableAdaptiveFrameSkipping bool
Dynamically adjust frame skipping based on device processing load & latency.
final
enableAutoBrightnessCheck bool
Analyze frame luminosity and emit low-light alert if below threshold.
final
enableAutoZoom bool
Automatically trigger digital camera zoom when small barcodes are detected far away.
final
enableBlurDetection bool
Evaluate frame sharpness score to trigger auto-refocus if blurred.
final
enableDuplicateFilter bool
Whether duplicate filtering is enabled.
final
enableImageEnhancement bool
Apply brightness normalization, contrast enhancement, sharpening, and denoising in isolate.
final
enableIsolateProcessing bool
Offload YUV/NV21 image conversions, ROI cropping, and image enhancement to background isolate.
final
enableMultiCodeDetection bool
Allow detecting multiple barcodes/QR codes in a single image pass.
final
enablePauseOnStaticFrame bool
Automatically skip vision engine analysis when scene remains static.
final
enableScanHistory bool
Retain in-memory log of recent scan results.
final
enableSound bool
Whether audio beep feedback is emitted on scan success/failure.
final
enableVibration bool
Whether haptic vibration feedback is triggered on scan success/failure.
final
frameThrottleMs int
Minimum delay in milliseconds between consecutive frame analysis passes. (e.g. 50ms = max 20 detections/sec for optimal CPU & battery usage).
final
hashCode int
The hash code for this object.
no setterinherited
isFocusLocked bool
Whether camera focus is currently locked to prevent hunting.
final
lowLightThreshold double
Normalized ambient luminosity threshold (0.0 to 1.0) for low-light detection.
final
maxBatchCount int?
Optional maximum items limit in batch inventory mode.
final
maxHistorySize int
Maximum scan history capacity.
final
maxMultiCodeCount int
Maximum number of codes to return in a multi-code pass.
final
minConfidence double
Minimum confidence required to accept a scan result (0.0 to 1.0).
final
rectScanArea Rect?
Optional explicit pixel/coordinate scan rectangle restriction area.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scanStrategy ScanStrategy
Active result handling strategy (single, continuous, batch).
final
scanWindow ScanWindow?
Restrict image analysis strictly to this sub-region cutout (ROI).
final
targetFrameRate int
Target frame processing rate in frames per second (e.g. 15-20 FPS).
final
torchLevel double
Flashlight torch intensity brightness level (0.0 to 1.0).
final

Methods

copyWith({ScanStrategy? scanStrategy, ScanWindow? scanWindow, int? frameThrottleMs, int? targetFrameRate, bool? enableAdaptiveFrameSkipping, bool? enablePauseOnStaticFrame, Duration? duplicateTimeout, bool? enableDuplicateFilter, bool? enableIsolateProcessing, bool? enableImageEnhancement, bool? enableBlurDetection, bool? enableAutoBrightnessCheck, bool? autoTorchInLowLight, double? lowLightThreshold, bool? enableAutoZoom, bool? autoResetZoomAfterScan, double? autoZoomThreshold, bool? continuousAutofocus, bool? enableMultiCodeDetection, int? maxMultiCodeCount, bool? enableScanHistory, int? maxHistorySize, int? maxBatchCount, double? minConfidence, Rect? rectScanArea, List<String>? allowedFormats, bool? enableSound, bool? enableVibration, double? torchLevel, bool? isFocusLocked}) ScannerOptions
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

Constants

batterySaver → const ScannerOptions
Battery-saver preset for background/inventory batch scanning.
highPerformance → const ScannerOptions
High-performance preset optimized for speed and low CPU consumption.