I\'m on VSCode right now working on my flutter application when hot reload just stops working, right in the middle of my development. I have absolutely no idea why this happ
For those who are using MAC.
I am using mac, and I handled this through by quitting first the emulator and VS Code and then restarting the computer.
It should be kept in mind that when you use stateless or stateful widget then you can get the feature of hot reload.
By pressing command+s it will save the file and will perform hot reload automatically.
I had the same problem in VS code. Here is how I solved it :
I was using style
property for Text
from an external file. I found that change in external file doesn't reflect in hot reload.
Text(
AppStrings.giveFeedbackPageText,
style: AppStyles.bodyText,
textAlign: TextAlign.center,
overflow: TextOverflow.ellipsis,
),
So I had to use TextStyle
from that file instead of an external file, and it works! Dont know the reason. Probably the external style
needs to be inside a widget.
Another solution could be - separating home
from MaterialApp
into a separate widget.