How to pass data from one provider model to another?

Posted by Andre Scott | Updated on

Want to pass data from one provider model to another? Using provider, one model doesn’t access another model. Instead, you should use ProxyProvider, to combine a model from others.

Your models would look like:

And then you can use ChangeNotifierProxyProvider this way (assuming there’s a `ChangeNotifierProvider higher in your widget tree):


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers