dispose method

void dispose()
override

Call when this hook is no longer needed.

Implementation

void dispose() {
  Reactter.off(ReactterInstance<T>(id), Lifecycle.initialized, _onInstance);
  Reactter.off(ReactterInstance<T>(id), Lifecycle.willMount, _onInstance);
  Reactter.off(ReactterInstance<T>(id), Lifecycle.destroyed, _onInstance);

  update(() {
    _instance = null;
  });

  _isDisposed = true;

  super.dispose();
}