What is the difference between hot reload, hot restart, and full restart in Flutter and does web support them too?
1 Answer
Hot Reload:
Hot reload loads code changes into the VM and re-builds the widget tree, preserving the app state; it doesn’t rerun
main()
orinitState()
.For IntelliJ or Android Studio: cmd + \
For VSCode: ctrl + F5
Hot Restart:
Hot restart loads code changes into the VM, and restarts the Flutter app, losing the app state.
For IntelliJ or Android Studio: shift + cmd + \
For VSCode: shift + ctrl + F5
Full Restart:
- Full restart restarts the iOS, Android, or web app. This takes longer because it also recompiles the Java / Kotlin / ObjC / Swift code. On the web, it also restarts the Dart Development Compiler. There is no specific keyboard shortcut for this; you need to stop and start the run configuration.
Flutter web currently supports hot restart but not hot reload.
-
1