SwiftUI also includes several options for more complex state
management such as the ObservableObject protocol.

Flutter manages local state using a StatefulWidget.
Implement a stateful widget with the following two classes:

a subclass of StatefulWidget

a subclass of State

The State object stores the widget’s state.
To change a widget’s state, call setState() from the State subclass
to tell the framework to redraw the widget.

The following example shows a part of a counter app:

Test in DartPad

View on GitHub

To learn more ways to manage state, check out State management.

Animations

Two main types of UI animations exist.

Implicit that animated from a current value to a new target.

Explicit that animates when asked.

Implicit Animation