Handling User’s Integration
If the unique characteristics of the widget need to be changed on the user’s interaction basis, that widget is stateful. These stateful widgets store their mutable state in the subclass state. Having a separate state and widget objects let other widgets treats stateless and stateful widgets in the same manner, without being concerned about losing the state.