dispose method

  1. @mustCallSuper
void dispose()
inherited

Called when this object is removed

Implementation

@mustCallSuper
void dispose() {
  _isDisposed = true;

  if (_instanceAttached != null) {
    Reactter.off(
      _instanceAttached!,
      Lifecycle.destroyed,
      _onInstanceDestroyed,
    );

    _instanceAttached = null;
  }

  Reactter.offAll(this);
}