Overview of the ChangeNotifier Class

Learn about the native Flutter ChangeNotifier class.

In this lesson, we will learn how to navigate from one screen to another with Provider's help while keeping our State intact.

ChangeNotifier and Provider

If we want to avoid widget rebuilding in Flutter, the rule is to avoid stateful widgets. There is a golden solution available for this.

We can use ChangeNotifier native class of Flutter along with the Provider package.

Although using a stateful widget for a small app is acceptable, always avoid stateful widgets and stick with the Provider package for full-blown, complicated app architecture. This will help us avoid widget rebuilding and keep our load times low.

In any app development, managing time complexity makes all the difference.

We will learn how to avoid widget-rebuilding in Flutter, so we can reduce the loading time.

Previously, we’ve learned how we can build a small quiz app in Flutter. Since it was a small app, we used a stateful widget. We can view the application in the image below:

Get hands-on with 1200+ tech skills courses.