runOnDispose method

  1. @override
  2. @internal
void runOnDispose()
inherited

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

Implementation

@override
@internal
void runOnDispose() {
  // Stops listening to the previous async operation
  _lastFutureSub?.call();
  _lastFutureSub = null;
  _lastFuture = null;
  _cancelSubscription?.call();
  _cancelSubscription = null;
  super.runOnDispose();
}