Version: 9.0.7Listen when a provider has disposed a Notifierfinal counterProvider = Provider.state<CounterNotifier,int>( (ref) { ref.onDispose(() { // YOUR CODE HERE }); return CounterNotifier(); },);Copy