Hot Reload, Hot Restart and DevTools

Google Flutter 9 min min read Updated: Nov 16, 2026 Beginner
Hot Reload, Hot Restart and DevTools
Beginner Topic 4 of 5

Why Flutter Development is Fast

In many mobile frameworks you must rebuild and reinstall the app after every small change, which can take minutes. In Flutter you change the code, press save, and the running app updates in about a second. This is called hot reload.

Hot Reload vs Hot Restart

Hot reloadHot restart
SpeedUnder a secondA few seconds
Keeps app state (like a counter value)?YesNo, state is reset
Shortcut in terminalrR
Use it forUI changes: colors, text, layoutChanges to main(), global variables, initState
Not enough forAdding new packages, native changesNative code changes (needs a full stop and run)
In VS Code and Android Studio: Hot reload happens when you save the file (VS Code) or press the lightning bolt button (Android Studio). If a change does not show, try a hot restart.

Try Hot Reload

  1. Run your app with flutter run.
  2. Change a text or a color in main.dart.
  3. Save the file.
  4. Watch the change appear without restarting.

Keyboard Commands in the flutter run Terminal

KeyAction
rHot reload
RHot restart
hShow all commands
dDetach (keep app running)
qQuit

Printing to the Console

dart import 'package:flutter/foundation.dart'; void main() { print('Simple message'); debugPrint('Better for long messages in Flutter'); }

The Widget Inspector

The Widget Inspector shows the widget tree of your running app. Tap a widget on the screen and see its size, padding and parent. It is the best way to understand layout problems, and you can open it from the editor toolbar or from DevTools.

Flutter DevTools

bash flutter run # the terminal prints a link for the Dart DevTools
Tool tabUse
InspectorSee the widget tree and layout details
PerformanceFind slow frames and jank
MemoryFind memory leaks
NetworkSee API requests and responses
LoggingRead your logs
DebuggerSet breakpoints and step through code

Static Analysis

bash flutter analyze

flutter analyze finds errors, warnings and style problems without running the app. Run it before you commit code.

Debug banner: The small DEBUG ribbon in the corner shows that you are running a debug build. Debug builds are slower on purpose. Test real speed with flutter run --release on a real device.

Conclusion

Hot reload makes experimenting easy, so change things often. When something looks wrong, open the Widget Inspector and look at the tree.

Quick Summary: Hot reload keeps state and applies UI changes. Hot restart resets the app. DevTools helps you inspect and debug.

Get Newsletter

Subscibe to our newsletter and we will notify you about the newest updates on Edugators