Flutter added a very good feature, which is the hot reload I tried it several times but I noticed that it isn't working with everything for example if I changed the background color of the app and perform hot reload the color will change but there are other complex things that hot reload isn't enough for them and I must run the app again to see the changes .So my question is when I make a change in my app how to know if hot reload is enough to see the changes or not ??
Asked
Active
Viewed 253 times
-2
-
3https://flutter.io/hot-reload/ – Blasanka Aug 19 '18 at 15:24
-
Maybe make a specific question asking why one case is not hot reloaded – Rémi Rousselet Aug 19 '18 at 16:53
1 Answers
0
Hot reload repaints the whole screen once, so if you change aspects inside of your build()
-function they should apply with hot reload, but for example changes in your initState()
won't transfer.
So as a general advice, for smaller changes like padding adjustments, color changes etc.(mostly visual changes) a hot reload will be enough, if they don't transfer try hot restart.
If you change the code and it's functions, add new elements etc.(all bigger changes) I would recommend hot restart for safety reasons, it only takes a couple seconds anyways.

leodriesch
- 5,308
- 5
- 30
- 52