In a context of pure Dart project I want to "watch" changes on dependencies. How do I listen to the changes?
As far as read() I am all fine i guess.
final container = ProviderContainer();
final dependency = container.read(myDependencyProvider);
CodePudding user response:
You need to extend ProviderObserver and override didUpdateProvider
ProviderObserver listens to the changes of a ProviderContainer.
