We kind of telegraphed this topic since the first chapter because we’ve been writing classes that extend a StatelessWidget. Now if Flutter has a StatelessWidget, then you’d think it also has a StatefulWidget. And you’d be right.
But what exactly is a StatefulWidget? How does it differ from a stateless one? When do we choose one vs. the other? What is the structure of a StatefulWidget? Are there rules for using one? If the data changes, how do you re-render it? Good questions, right? Well, be patient young Jedi and we’ll answer all of those and more in this chapter.
What is state?
State is widget ...