edufolly / flutter_bluetooth_serial

A basic Flutter Bluetooth Serial
MIT License
476 stars 455 forks source link

Device disconnected callback needed #190

Open mategyorfy opened 1 year ago

mategyorfy commented 1 year ago

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.

AlecDr commented 1 year ago

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.