Provider vs. InheritedWidget


Am I wrong or if we just want to pass a value down the Widget tree, Provider is just an InheritedWidget with a dispose method?


Yes. Provider is indeed mostly features based on Inheritedwidgets.

If you want to make your own, then that’s fine. But you’ll quickly realize that, without provider, you’ll have hundreds of useless repetitive lines.

Provider basically takes the logic of InheritedWidgets, but reduce the boilerplate to the strict minimum.

Answered By – Rémi Rousselet

Answer Checked By – Cary Denson (FlutterFixes Admin)

Leave a Reply

Your email address will not be published. Required fields are marked *