bluetooth_print
bluetooth_print copied to clipboard
False updates on status stream
i get ghost updates on the bluetoothprint.state status stream , even though the printer is connected i get the status 0 i.e. disconnected update for a few seconds only to set back to connected a few seconds later
bluetoothStatusStream = bluetoothPrint.state.listen((state) async {
switch (state) {
case BluetoothPrint.CONNECTED:
// i treat this state as connected
break;
case BluetoothPrint.DISCONNECTED:
// i treat this state as disconnected
break;
case 12:
// wierdly this fires whenever bluetooth radio is turned on
break;
case 10:
// fires when bluetooth radio is turned off
default:
break;
}