Find the right State object to call its setState()

In time, you’ll get to know one important circumstance when working with Flutter — you will regularly need to call a State object’s setState() function. In other words, you’ll need to repeatedly ‘refresh’ or ‘rebuild’ the app’s interface and reflect any on-going changes, and that’s done by calling a State object’s setState() function. Doing so will have the Flutter framework call that State object’s build() function. You’re not to directly call the build() in the declarative programming framework that is Flutter. You’re to call setState().

In time, however, while working with…

Greg Perry

Freelance Developer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store