Skip to content
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 disconnect the connected device when quit App #175

Closed
yudeying918 opened this issue Dec 24, 2022 · 2 comments
Closed

How to disconnect the connected device when quit App #175

yudeying918 opened this issue Dec 24, 2022 · 2 comments

Comments

@yudeying918
Copy link

if there is connected device when quit app, next time open the app, it's still shows connected, but cann't operate, so i want to disconnect when app is quit, to avoid this problem, is anyone tried before, thanks.

@farhantandia
Copy link

farhantandia commented Dec 28, 2022

use this widget as a parent widget in your screen..


WillPopScope(
        onWillPop: (){
device!.disconnect();
Future.value(true)
},
child: Scaffold....

@yudeying918
Copy link
Author

yudeying918 commented Jan 9, 2023 via email

@boskokg boskokg closed this as completed Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants