Introduction to StateNotifierProvider

Learn what the StateNotifier and StateNotifierProvider are and how you can reduce widget rebuilds with them.

What is the StateNotifier?

StateNotifierProvider is just another Provider variant in Riverpod to manage state in Flutter. However, there is a remarkable difference with ChangeNotifierProvider.

What is the StateNotifierProvider?

The StateNotifierProvider does not use notifyListener() anymore as it does not extend the data model with ChangeNotifier. However, it depends on StateNotifier, a Flutter independent mutable state change mechanism that has similarities with ChangeNotifier or ValueNotifier.

We’ll come to that point and discuss the core concepts in detail in the latter part of this lesson.

Get hands-on with 1400+ tech skills courses.