It seems the code runs through this block a second time for some reason which gives me the Bad State Error. Is there a way to fix this?
_receivedDataStream =
flutterReactiveBle.subscribeToCharacteristic(_txCharacteristic);
_receivedDataStream.listen((data) {
onNewReceivedData(data);
}, onError: (dynamic error) {
_logTexts = "${_logTexts}Error:$error$id\n";
});
It seems the code runs through this block a second time for some reason which gives me the Bad State Error. Is there a way to fix this?