bluetooth_print icon indicating copy to clipboard operation
bluetooth_print copied to clipboard

False updates on status stream

Open Rohan-raftlabs opened this issue 10 months ago • 0 comments

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;
  }

Rohan-raftlabs avatar Sep 14 '23 08:09 Rohan-raftlabs