When I run the flutter project for the first time it installs the app in the emulator device and it works normally, hot reload and hot restart also works fine. However, as soon as I stop and run the app again, the app hangs in either a white screen or it shows part of some widgets that they didn't finish loading yet.
I tried,
- running the app in vscode and in android studio using different virtual devices (3)
- re-installed flutter
- re-installed android studio
- ran flutter clean, flutter pub get multiple times
- flutter create .
- restarting the pc
with no luck. I'm not sure what I did wrong in the setup / installation process. And I googled the issue but nothing relatable came up.
The console doesn't show any errors too.
Reproduction steps:
Create a sample flutter project for android (counter sample app)
Spin up an emulator device
Run the app (should work fine) -> stop it completely -> run it again (this time it should show a blank screen) -> clear the cache from the emulator device -> run it again and it should work fine
I'm using latest flutter + android studio. API 35