I am using Provider package in my flutter app.
I am conditionally providing a ChangeNotifier class using provider.
A subsequent build method down the tree wants to check to see if the class exists, and it is not a failure case if it doesn't.
How can I do this using Provider package. Currently when I call...
Provider.of<MyChangeNotifier>(context);
It throws if MyChangeNotifier does not exist up the tree. All I want is a quick and simple check for MyChangeNotifier existence, because it is an expected case.