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 - StateContainerto create reusable components with their own internal state.
- To update the state, use the - setStateaction.
- To access the state, use the - statevariable.
Last updated