BleSerial constructor

BleSerial({
  1. required BleCharacteristic characteristicRx,
  2. required BleCharacteristic characteristicTx,
})

Implementation

BleSerial({
  required BleCharacteristic characteristicRx,
  required BleCharacteristic characteristicTx,
})  : _characteristicRx = characteristicRx,
      _characteristicTx = characteristicTx {
  _subscription = _characteristicRx.dataStream.listen((data) {
    _responseGuard.stop();
    notifyData(data);
  });
}