Why does StatefulWidget need to be immutable?

StatefulWidgets are separated into 2 classes because one part is entirely immutable . Widget subclass cannot store any mutable field. We are not in React where “Components” are mutable and the instance stays the same for the whole life of the component.

Sizin İçin Seçtik  Does a new state object is created if the widget re build?

Leave a Reply

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