A wrapper around InheritedWidget to make them easier to use and more reusable.
By using provider instead of manually writing InheritedWidget, you get:
simplified allocation/disposal of resources
lazy-loading
a vastly reduced boilerplate over making a new class every time
devtool friendly – using Provider, the state of your application will be visible in the Flutter devtool
a common way to consume these InheritedWidgets (See Provider.of/Consumer/Selector)
increased scalability for classes with a listening mechanism that grows exponentially in complexity (such as Change Notifier, which is O(N) for dispatching notifications).
user the below link to integrate provider in flutter:
https://pub.dev/packages/provider/ins...