When building Flutter apps, you need to manage the state when the apps are running. The state may change due to user interactions or background tasks. This chapter covers recipes that use different solutions for state management in Flutter.
10.1 Managing State Using Stateful Widgets
Problem
You want to have a simple way to manage state in the UI.
Solution
Create your own subclasses of StatefulWidget.
Discussion
StatefulWidget class is the fundamental way in Flutter to manage state. A stateful widget rebuilds itself when its state changes. If the state to manage is simple, using stateful widgets is generally ...