Skip to main content
Version: 9.0.7

Listen when a provider has disposed a Notifier

final counterProvider = Provider.state<CounterNotifier,int>(
(ref) {
ref.onDispose(() {
// YOUR CODE HERE
});
return CounterNotifier();
},
);
Last updated on by darwin-morocho