31.34 Flutter Class StatefulWidget

20230910

A stateful widget allows an application to carry some state (the value of a counter, or the filename of a file that is to be loaded, etc). Flutter uses StatefulWidgets to capture state. A StatefulWidget knows how to generate State objects which is where the state is held.

In Flutter, Widgets are temporary objects and are used to construct the presentation of the application in its current state. We contrast this with the State object connected to the Widget. A State object is persistent between calls to build and so they can store data that lives beyond the build of the corresponding Widget.



Your donation will support ongoing availability and give you access to the PDF version of this book. Desktop Survival Guides include Data Science, GNU/Linux, and MLHub. Books available on Amazon include Data Mining with Rattle and Essentials of Data Science. Popular open source software includes rattle, wajig, and mlhub. Hosted by Togaware, a pioneer of free and open source software since 1984. Copyright © 1995-2022 Graham.Williams@togaware.com Creative Commons Attribution-ShareAlike 4.0