BarcodeKit class

The main class of the plugin.

Inheritance

Constructors

BarcodeKit()
Create a new instance of the plugin.

Properties

hashCode int
The hash code for this object.
no setterinherited
onBarcodeScannedCallback OnBarcodeScannedCallback?
Callback for when a barcode is scanned.
getter/setter pair
onTextDetectedCallback OnTextDetectedCallback?
Callback for when a text is scanned.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
torchEnabled bool
Returns whether the torch is enabled.
no setter

Methods

closeCamera() → void
Closes the camera.
getPermissionStatus() Future<PermissionStatus>
Returns the current permission status.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onBarcodeScanned(DetectedBarcode barcode) → void
Called from the host when a barcode is detected.
override
onTextDetected(String text) → void
Called from the host when text is detected.
override
onTorchStateChanged(bool enabled) → void
Called from the host when the torch state changes.
override
openCamera(CameraLensDirection direction, List<BarcodeFormat> formats, [List<CameraLensDirection> fallbackDirections = const []]) Future<CameraOpenResponse>
Opens the camera in direction and scans for formats.
openSettings() → void
Opens the app settings to fix the permissions.
pauseCamera() → void
Pauses the camera.
requestPermissions() Future<bool>
Requests the camera permission.
resumeCamera() → void
Resumes the camera.
setOCREnabled(bool enabled) → void
Sets the OCR state.
setTorch({required bool enabled}) → void
Sets the torch state.
toString() String
A string representation of this object.
inherited

Operators

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