What is the lifecycle of stateful widget?

In one word: performance. The tldr version is that State objects are long lived, but StatefulWidget s (and all Widget subclasses) are thrown away and rebuilt whenever configuration changes . It’s very inexpensive ie cheap for Flutter to rebuild a mutable widget.

Sizin İçin Seçtik  Should we use setState Flutter?

Leave a Reply

Your email address will not be published. Required fields are marked *