MobileScannerController class

Constructors

MobileScannerController({CameraFacing facing = CameraFacing.back, Ratio? ratio, bool? torchEnabled, List<BarcodeFormat>? formats})

Properties

args ValueNotifier<MobileScannerArguments?>
final
barcodes Stream<Barcode>
no setter
barcodesController StreamController<Barcode>
getter/setter pair
cameraFacingState ValueNotifier<CameraFacing>
latefinal
eventChannel EventChannel
getter/setter pair
events StreamSubscription?
getter/setter pair
facing CameraFacing
getter/setter pair
formats List<BarcodeFormat>?
If provided, the scanner will only detect those specific formats.
final
hashCode int
The hash code for this object.
no setterinherited
hasTorch bool
getter/setter pair
isStarting bool
getter/setter pair
methodChannel MethodChannel
getter/setter pair
ratio Ratio?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
torchEnabled bool?
final
torchState ValueNotifier<TorchState>
final

Methods

analyzeImage(String path) Future<bool>
Handles a local image file. Returns true if a barcode or QR code is found. Returns false if nothing is found.
dispose() → void
Disposes the MobileScannerController and closes all listeners.
ensure(String name) → void
Checks if the MobileScannerController is bound to the correct MobileScanner object.
handleEvent(Map event) → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
start() Future<void>
Start barcode scanning. This will first check if the required permissions are set.
stop() Future<void>
switchCamera() Future<void>
Switches the torch on or off.
toggleTorch() Future<void>
Switches the torch on or off.
toString() String
A string representation of this object.
inherited

Operators

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