State management with Provider As soon as the state changes, that particular widget rebuilds without affecting other widgets in the tree . Three major components make all of this possible: the ChangeNotifier class in Flutter, the ChangeNotifierProvider (primarily used in our sample app), and the Consumer widgets.