How to consume Provider after navigating to another route?

Posted by Andre Scott | Updated on

You can pass the existing model forward creating a new ChangeNotifierProvider using the value of the existing one.

For that, you need to use ChangeNotifierProvider.value constructor passing the existing model2 as the value.


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