runOnDispose method

  1. @override
void runOnDispose()
inherited

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

Implementation

@override
void runOnDispose() {
  _keepAliveLinks?.clear();
  super.runOnDispose();
  assert(
    _keepAliveLinks == null || _keepAliveLinks!.isEmpty,
    'Cannot call keepAlive() within onDispose listeners',
  );
}