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