Closed hamidjalili59 closed 3 years ago
emm... Do you mean port.close().onError((error){}).onDone((){})
which like stream?
I can try it, but I'm not very familiar with Stream or implementing Stream like function. Maybe it will take some time.
done
port.closeOnListen(
onListen: () => print(port.isOpened),
)
..onError((err) {
print(err);
})
..onDone(() {
print("is closed");
print(port.isOpened);
});
I did't test onError because I think it can work.
Salute bro 🙋 Can you put an function to execute codes before disconnecting the port Like onDone() or onErr() 🙏 These two are very useful in the serial port Thanks 🥰