Back to results for “Testing & Debugging”
Flutter › Flutter DevTools & Debugging

What is hot reload in Flutter, and how does it let you see the direct visual result of a code change almost instantly, without needing to fully restart your entire app from scratch every single time?

Beginner

Answer

Hot reload injects your updated source code directly into an already actively running Dart virtual machine while genuinely preserving your app's existing current state, such as which specific screen you are currently on or the exact current values held within your active text fields, letting you see the resulting direct visual effect of a small code change, such as adjusting a specific widget's color or padding, appear almost instantly on screen, which dramatically speeds up the entire iterative development process compared to needing to fully restart your entire app completely from scratch after every single small individual change.
// Save a file while the app is running,
// and Flutter automatically applies a hot reload within roughly one second
Real-world example A developer fine tuning the exact padding and spacing values throughout a complex checkout screen relies heavily on hot reload to instantly see each small individual adjustment reflected immediately on screen, without ever needing to tediously navigate back through several screens after each individual code change.

Common follow-ups: What specific kinds of code changes actually require a full hot restart rather than simply a hot reload?;Why does hot reload not actually work at all for a genuine release build?