subscribeToBarcodeDataStream method

Future<Stream<BarcodeData>> subscribeToBarcodeDataStream(
  1. String deviceId
)

Subscribes to the barcode data stream from the BLE device with the given deviceId.

deviceId - The identifier of the target device.

Returns a stream of BarcodeData received from the device.

Implementation

Future<Stream<BarcodeData>> subscribeToBarcodeDataStream(
    String deviceId) async {
  try {
    return _bleDevicesStreamsHandler.dataHandler.getStream(deviceId);
  } catch (e) {
    _appLogger.error("Error subscribing to barcode data stream: $e");
    rethrow;
  }
}