BarcodeScannerWidget class

Widget displaying the camera stream while scanning barcodes.

Inheritance

Constructors

BarcodeScannerWidget({Key? key, CameraSelector cameraSelector = CameraSelector.back, bool startScanning = true, bool stopScanOnBarcodeDetected = true, CameraOrientation orientation = CameraOrientation.portrait, ScannerType scannerType = ScannerType.barcode, dynamic onBarcodeDetected(Barcode barcode)?, dynamic onTextDetected(String textResult)?, dynamic onMrzDetected(String mrz, Uint8List image)?, dynamic onScanProgress(int? progress)?, required dynamic onError(dynamic error)})
const

Properties

cameraSelector → CameraSelector
Select which camera should be used when creating the widget.
final
hashCode → int
The hash code for this object.
no setterinherited
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onBarcodeDetected → dynamic Function(Barcode barcode)?
This function will be called when a barcode is detected.
final
onError → dynamic Function(dynamic error)
final
onMrzDetected → dynamic Function(String mrz, Uint8List image)?
This function will be called when a bloc MRZ is detected.
final
onScanProgress → dynamic Function(int? progress)?
final
onTextDetected → dynamic Function(String textResult)?
This function will be called when a bloc of text is detected.
final
orientation → CameraOrientation
The orientation of the camera. Default set as Prortait
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
scannerType → ScannerType
The type of scanner which should decode the image and scan data
final
startScanning → bool
Indicates if the barcode scanning process should start when creating the widget.
final
stopScanOnBarcodeDetected → bool
Indicates if barcode scanning should stop after a barcode is detected. If false, onBarcodeDetected may be triggered multiple times for the same barcode.
final

Methods

createElement() → StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → State<BarcodeScannerWidget>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() → List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) → String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String
Returns a one-line detailed description of the object.
inherited
toStringShort() → String
A short, textual description of this widget.
inherited

Operators

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