MobileScannerController class

Standalone controller wrapper matching mobile_scanner API conventions.

Inheritance

Constructors

MobileScannerController({CameraFacing facing = CameraFacing.back, TorchState torchState = TorchState.off, List<BarcodeFormatFilter>? formats, double detectionTimeoutMs = 1000, bool autoStart = true})
Constructs a MobileScannerController.

Properties

barcodes → Stream<BarcodeCapture>
Stream emitting detected barcodes (mobile_scanner compatibility).
no setter
facing → CameraFacing
Active hardware camera facing direction.
no setter
hashCode → int
The hash code for this object.
no setterinherited
hasListeners → bool
Whether any listeners are currently registered.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
scannerController → ScannerController
Underlying core scanner controller.
no setter
torchState → TorchState
Active flashlight torch state.
no setter

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
analyzeImage(String imagePath) → Future<BarcodeCapture?>
Scans local image file at imagePath (mobile_scanner.analyzeImage compatibility).
dispose() → void
Discards any resources used by the object.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
setZoomScale(double zoom) → Future<void>
Sets camera digital zoom scale factor.
start() → Future<void>
Starts live camera scanning.
stop() → Future<void>
Stops live camera scanning.
switchCamera() → Future<void>
Switches hardware camera facing direction.
toggleTorch() → Future<void>
Toggles flashlight torch state.
toString() → String
A string representation of this object.
inherited

Operators

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