📱 Flutter
Intermediate
What is the Provider package in Flutter?
Answer
Provider is the officially recommended state management package for Flutter. It builds on top of InheritedWidget to propagate data down the widget tree efficiently. You wrap a part of the tree with a ChangeNotifierProvider, expose a ChangeNotifier model, and any widget can access it via context.read() (one-time access) or context.watch() (subscribes to changes). When notifyListeners() is called, only the widgets watching that provider rebuild.
Previous
What is state management in Flutter and why is it important?
Next
What is the BLoC pattern in Flutter?