Hot reload is a powerful feature but has limitations. It doesn’t fully reload the app state or structure.

Common Causes:

  1. Stateful changes not detected
  • Adding new variables to a State class
  • Refactoring class names
  1. Global state changes
  2. Use of const or final values initialized outside build

Fixes:

  • Try Hot Restart instead:

Yaml:

r # in terminal

Or use IDE button → Hot Restart.

  • Restart emulator if stuck
  • Clear build cache:

bash:

flutter clean
flutter pub get

Rule of Thumb: Use Hot Reload for UI tweaks, Hot Restart for logic or state changes.