ZebraHandheldScanner class
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
-
autoConnectBle()
→ Future<String>
-
Initiates BLE auto-connection and returns a QR code string.
Listen to the 'zebra_handheld_scanner' method channel for connection events.
-
disconnect()
→ Future<void>
-
Disconnects from the current scanner.
-
getBatteryLevel()
→ Future<int?>
-
Gets the battery level (0-100) of the connected scanner.
-
getDeviceName()
→ Future<String?>
-
Gets the device name of the connected scanner.
-
getPlatformVersion()
→ Future<String?>
-
-
getVersion()
→ Future<String?>
-
Gets the version of the connected scanner.
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
requestPermissions()
→ Future<bool>
-
Requests the necessary Bluetooth and Location permissions natively.
Returns
true if all necessary permissions are granted.
-
sendCommand(String command)
→ Future<void>
-
Sends an arbitrary hex command string (e.g. "ba0515") to the connected scanner.
-
sendLaserCommand(String command)
→ Future<void>
-
Sends a scan head control command (OP_CMD_TO_LASER: 0x06).
-
sendSpecCode(String code)
→ Future<void>
-
Sends a specific setting configuration code to the scanner (OP_SPEC_CODE: 0x05).
Automatically strips '%%SpecCode' if it is passed in, as the scanner
expects just the underlying text encoded as ASCII bytes.
-
setBuzzer(BuzzerType type)
→ Future<void>
-
Sets the scanner's speaker buzzer sound type (OP_SET_SPEAKER: 0x07).
-
setDeviceName(String name)
→ Future<void>
-
Sets a new device name for the connected scanner.
-
setLed(LedColor color, {int durationMs = 500, int blinkCount = 1})
→ Future<void>
-
Sets the scanner's LED color, duration, and blink count (OP_SET_LED: 0x0B).
durationMs must be in milliseconds (e.g., 500ms = 10 units of 50ms). Max is 255 units (12750ms).
blinkCount is the number of blinks (0 to 255).
-
setListeners({dynamic onScannerConnected(bool)?, dynamic onScannerAutoConnectStep(int)?, dynamic onBarcodeScanned(String)?})
→ void
-
Sets up a handler to listen to events from the native side
-
setVibrator(VibratorType type)
→ Future<void>
-
Sets the scanner's vibration feedback (OP_SET_VIBRATOR: 0x08).
-
toString()
→ String
-
A string representation of this object.
inherited