BarcodeScanner class

Barcode scanner plugin Simply call var barcode = await BarcodeScanner.scan() to scan a barcode

Constructors

BarcodeScanner()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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

Static Properties

numberOfCameras Future<int?>
Returns the number of cameras which are available Use n-1 as the index of the camera which should be used.
no setter

Static Methods

scan({ScanOptions options = const ScanOptions()}) Future<ScanResult>
Starts the camera for scanning the barcode, shows a preview window and returns the barcode if one was scanned. Can throw an exception. See also cameraAccessDenied

Constants

cameraAccessDenied → const String
If the user has not granted the access to the camera this code is thrown.
cameraAccessGranted → const String
If the user has granted the access to the camera this code is returned.