Beginner Flutter
Q5 / 100

What does setState() do in a StatefulWidget?

Correct! Well done.

Incorrect.

The correct answer is C) It notifies Flutter that internal state has changed and schedules a rebuild of the widget

C

Correct Answer

It notifies Flutter that internal state has changed and schedules a rebuild of the widget

Explanation

Calling setState() inside a StatefulWidget tells the Flutter framework that the internal state of this object has changed. Flutter will then schedule a call to the build() method to update the UI with the new state.

Progress
5/100