flutter_bluetooth_serial icon indicating copy to clipboard operation
flutter_bluetooth_serial copied to clipboard

Device disconnected callback needed

Open mategyorfy opened this issue 3 years ago • 1 comments

Hi! Could you make the onDisconnected callback public? I haven't found any ways to let my app know when the remote device is disconnected so it would me a lot if you made it public.

mategyorfy avatar Jan 03 '23 16:01 mategyorfy

Hey @MatejaBoy

the onDone() function from the BluetoothConnection instance should work, there you can receive an disconnect fired from you or from the device.

Also check the library example, there you can get an idea from the chat screen code.

AlecDr avatar Mar 23 '23 19:03 AlecDr