juniorFlutter

What is hot reload vs hot restart?

Updated Apr 28, 2026

Short answer

Hot reload updates UI instantly while preserving state. Hot restart completely reloads the app, losing current state.

Deep explanation

Hot reload works by injecting updated source code files into the running Dart Virtual Machine (VM). It redraws the widget tree but keeps the existing State objects. Hot restart destroys the current Dart VM isolate, recreates it, and runs main() again from scratch.

Real-world example

Using Hot Reload to tweak padding values. Using Hot Restart when you initialize new variables in initState.

Common mistakes

  • Expecting Hot Reload to run `initState()` again or update global static variables. It does not.

Follow-up questions

  • Does Hot Reload work in release mode?
  • What happens to the widget tree on hot reload?

More Flutter interview questions

View all →