creativecreatorormaybenot
creativecreatorormaybenot

Reputation: 126674

Flutter Hot Reload in Android Studio

I firstly wondered how to perform a hot reload in Flutter with Android Studio. Since I am already so used to the auto-save of Android Studio I did not even consider CTRL + S for the hot reload.

I then assigned the Flutter Hot Reload in the Keymap and this worked really well. But now I just realised that CTRL + S does also perform the hot reload. I looked the shortcut up in the Keymap and discovered that CTRL + S is mapped to Save All.

Save All in Keymap

Now I am wondering what does Save All even do and does it do any extra compared to my assigned Flutter Hot Reload key combination? I do not get the reason for Save All when Android Studio already saves everything automatically.

Upvotes: 5

Views: 34466

Answers (4)

vishva
vishva

Reputation: 49

In my scenario I was writing the code from scratch and not following the coding std. Until then it was problem in Hot reload when I start working on

 void main() => runApp(new HelloFlutterApp());

Upvotes: 2

creativecreatorormaybenot
creativecreatorormaybenot

Reputation: 126674

Conclusion

It really does matter. Apparrently the Flutter plugin simply reacts to a Save All call by executing Apply Changes, which will always call Flutter Hot Reload.

An interesting observation I made is that Flutter Hot Reload will not (as of writing) hot reload the application when there was no change in code, but Save All will and Apply Changes as well, which is why I wrote that Save All calls Apply Changes.

Upvotes: 9

Nikhil Soni
Nikhil Soni

Reputation: 939

Write flutter run into the terminal present at below in android studio. Once the app runs into your device or emulator press r into the terminal ->This will hot reload your app [for eg:- make some minor changes into your app after executing the flutter run then press r you can notice HOT RELOAD FUNCTIONALITY

Upvotes: 2

Günter Zöchbauer
Günter Zöchbauer

Reputation: 657178

ctrl+s is to save and when "Perform hot reload on save" is enabled also "hot reload"

enter image description here

Upvotes: 12

Related Questions