runOnDispose method

  1. @override
void runOnDispose()
override

Executes the Ref.onDispose listeners previously registered, then clear the list of listeners.

Implementation

@override
void runOnDispose() {
  super.runOnDispose();

  _removeListener?.call();
  _removeListener = null;

  _controllerNotifier.result?.stateOrNull?.dispose();
  _controllerNotifier.result = null;
}