Advanced
Flutter
Q100 / 100
What is the ChangeNotifier class used for in Flutter?
Correct! Well done.
Incorrect.
The correct answer is B) A mixin/class that holds state and calls notifyListeners() when state changes, used with Provider to rebuild dependent widgets
B
Correct Answer
A mixin/class that holds state and calls notifyListeners() when state changes, used with Provider to rebuild dependent widgets
Explanation
ChangeNotifier is a simple class that implements the observable pattern. It stores state and calls notifyListeners() when state changes. Used with Provider (ChangeNotifierProvider), all listening widgets rebuild when notifyListeners() is called.
Progress
100/100