I'm developing a Flutter Web app and running it from Android Studio. The app launches successfully in the browser and works fine. However, when I close the browser tab, the Flutter process in Android Studio (or in the terminal) does not detect the disconnection. It still gives me the red stop button, and I don't see the usual message like:
Lost connection to device.
This breaks things like lifecycle detection and makes hot reload behavior unreliable.
🔍 What I've Tried:
✅ Flutter Setup:
Flutter version: 3.32.5
🛠 What I've tried:
Cleared browser cache
Wiped emulator data (this helped fix a similar issue on Android Emulator)
Tested on a real device — works fine there
Reinstalled Android Studio
Reinstalled Flutter SDK
Tried using VS Code instead of Android Studio
Tried multiple browsers (Edge, Chrome, etc.) — the issue still occurs Tried using the web-server device and manually opened the app in Edge — this works but it’s not practical for everyday development