Flutter hot reload and hot restart not working only in certain modules/files(Android Studio, Windows 10)

Viewed 311

I've been writing an app with flutter for like 2 weeks or so now. Suddenly, a few days ago, the hot reload and hot restart functionality just seemed to stop working. Like I would make changes in the file that should be reloaded (like changing a text widget's text) but it Reloaded 0 of 583 libraries in 576ms. I've been messing around with Android Studio for quite a while now (it is happening in VSCode and when I make edits but reload/restart from the command line) and I've come to an interesting realization:

Hot Reload/Restart only works from specific modules. I have a lot of code here so I've separated out my widgets into different files and I use Navigator.push(context, MaterialPageRoute(builder: (context) => ModuleName()));

I'm really unsure why this is happening and it is super infuriating because I make a lot of little changes and can't wait to recompile the ENTIRE app. Does anybody know why this would be happening?

I thought it might be something similar to this link: https://flutter.dev/docs/development/tools/hot-reload#recent-ui-change-is-excluded. However, this doesn't seem right because I'm looking at my code and one widget can get pushed on and I can hot reload that, but if I push a different widget THAT one won't work.

(For the record, I've tried doing flutter clean, flutter doctor returns everything chill, and I added this environment variable all to no avail: No_PROXY=127.0.0.1 (or something like that).

0 Answers
Related