-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to listen to serial port connectivity continuously #74
Comments
Listen to SerialPortEvents. Check what is the output. Typically it is Event type which can equate to bool indicating the connectivity status. Put it in the initState of the connection screen and listen to this through a changenotifier to switch states when the device disconnects/connects. Looks something like this:
|
But there is no |
@hosseinvejdani have you found a way to this? |
No! |
something like this? an example:
|
Your example is for getting the data stream from the port. This issue is about getting the status of the connection on the port. for instance, if a USB device is suddenly disconnected, how do you detect that in the application? |
I don't see this feature on the serial port directly reading SerialPortReader code, I find this part:
maybe you can try something like this:
I can't try it myself yet |
Alright. |
Thanks @ohdonpiano, it works for me! |
Can we close this one? |
How to listen to serial port connectivity continuously in Flutter Linux app with flutter_libserialport package?
The text was updated successfully, but these errors were encountered: