Stateless Widget
- No State
- has only a Constructor function and
build()
function
Stateful Widget
- composed by
StatefulWidget
class (without build method) andState
class - the 'State' class can change in its life cycle (
setState
method, will callbuild()
again) - Constructor function and then
initState()
and thenbuild()
Both can have input data, build widget and render UI, and the Stateful Widget has State
.
Hot-reload actually calls setState
rather than restart the app.