This has been confusing me for a while. I am running a Flutter app inside an emulator in Android Studio. I wanted to check if my code actually uses variables in local storage, so I figured i have to close the app and then open it again to make sure of it. However, each time I close the app it says ‘Lost connection to device’ and I am not sure whether or not the application is running as it supposed to (i can still access the app and use it). Been searching in other questions but cant find any problem like mine, what could be the problem? Also is there a better way to check if my code uses the variables stored in local storage?
Question posted in Android Studio
The official documentation can be found here.
The official documentation can be found here.
2
Answers
In Flutter, and Android development in general, the logger connection closes when the application is closed. To test local storage, just log it on application start to check the current state
You can see logs of the disconnected devices with
flutter logs
command. Just write it in the terminal.