iDecode
iDecode

Reputation: 28886

What is the difference between hot reload, hot restart, and full restart?

What is the difference between hot reload, hot restart, and full restart in Flutter and does web support them too?

Upvotes: 8

Views: 6649

Answers (1)

iDecode
iDecode

Reputation: 28886

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() or initState().

    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.

Upvotes: 23

Related Questions