startScan static method
Start scanning for barcodes
Triggers the soft scan trigger on the Zebra device. Scanner must be initialized before calling this method.
Returns true if scanning started successfully
Implementation
static Future<bool> startScan() async {
if (!_isInitialized) {
throw Exception('Scanner not initialized. Call initialize() first.');
}
try {
await _channel.invokeMethod('startScanning');
_updateStatus(ScannerStatus.scanning);
return true;
} on PlatformException catch (e) {
_updateStatus(ScannerStatus.error);
throw Exception('Failed to start scanning: ${e.message}');
}
}