While changes to const field values are always hot reloaded,
the static field initializer is not rerun. Conceptually,
const fields are treated like aliases instead of state.

The Dart VM detects initializer changes and flags when a set
of changes needs a hot restart to take effect.
The flagging mechanism is triggered for
most of the initialization work in the above example,
but not for cases like the following:

To update foo and view the change after hot reload,
consider redefining the field as const or using a getter to
return the value, rather than using final.
For example, either of the following solutions work:

For more information, read about the differences
between the const and final keywords in Dart.

Recent UI change is excluded

Even when a hot reload operation appears successful and generates no
exceptions, some code changes might not be visible in the refreshed UI.
This behavior is common after changes to the app’s main() or
initState() methods.