Flutter apps are built from widgets, and every widget is either stateless or stateful. A stateless widget is a fixed description of part of the UI; a stateful widget owns data that changes over time and rebuilds when it does. Knowing which to reach for, and where that data should live, is the mental model behind every Flutter screen you'll build.
This module starts with StatelessWidget and how the widget tree and element tree relate. It then looks at ephemeral state versus app state and the idea of lifting state up so that widgets that need the same data can share it. You'll see how InheritedWidget passes data down the tree without threading it through every constructor, and finish with keys, which decide whether Flutter preserves or resets a widget's state when widgets are added, removed or reordered.
Watch the lessons in order, then continue on to State Management.
The Flutter team explains what a widget is and how to compose interfaces with StatelessWidget, including how widgets and elements relate in the tree.
A Google I/O 2019 session on thinking about state: what belongs inside a single widget, what needs to be shared, and the options for managing it.
A Flutter team workshop on using InheritedWidget to share state with descendants in the widget tree, the mechanism that packages like Provider build on.
The Flutter team explains how keys preserve state when stateful widgets move around, and which kind of key to use.