State Container
The State Container is a simple widget that holds a single child. It is used to create a local state for a part of the widget tree. This is useful for creating reusable components that have their own internal state, without having to pass the state down from a parent widget.
Best Practices
Use the
StateContainer
to create reusable components with their own internal state.To update the state, use the
setState
action.To access the state, use the
state
variable.
Last updated