dispose method

void dispose()

Implementation

void dispose() {
  widget.dispose?.call(this);
  if (_isCreator! || widget.assignId) {
    if (widget.autoRemove && June.isRegistered<T>(tag: widget.tag)) {
      June.delete<T>(tag: widget.tag);
    }
  }

  for (final disposer in disposers) {
    disposer();
  }

  disposers.clear();

  _remove?.call();
  _controller = null;
  _isCreator = null;
  _remove = null;
  _filter = null;
  _needStart = null;
  _controllerBuilder = null;
  _controller = null;
}