Introduction to declarative UI

Why a declarative UI?

How to change UI in a declarative framework

This introduction describes the conceptual difference between the
declarative style used by Flutter, and the imperative style used by
many other UI frameworks.

Why a declarative UI?

Frameworks from Win32 to web to Android and iOS typically use an imperative
style of UI programming. This might be the style you’re most familiar
with—where you manually construct a full-functioned UI entity,
such as a UIView or equivalent, and later mutate it using methods and
setters when the UI changes.

In order to lighten the burden on developers from having to program how to
transition between various UI states, Flutter, by contrast,
lets the developer describe the current UI state and leaves the
transitioning to the framework.

This, however, requires a slight shift in thinking for how to manipulate UI.

How to change UI in a declarative framework