-2

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 ??

Blasanka
  • 21,001
  • 12
  • 102
  • 104

1 Answers1

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