Where we can use setState in Flutter?

When you change the state of a Stateful Widget , use setState() to cause a rebuild of the widget and its descendants. You don’t need to call setState() in the constructor or initState() of the widget, because build() will be run afterward anyway. Also don’t call setState() in synchronous code inside build().28 May 2021

Sizin İçin Seçtik  Which method is called to Rerender the widget tree once state is changed?

Leave a Reply

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