dispose method

  1. @override
  2. @mustCallSuper
void dispose()
inherited

This is called on Ref.dispose. You can override this method to dispose resources.

Implementation

@override
@mustCallSuper
void dispose() {
  final disposeAction = this.disposeAction;
  if (disposeAction != null) {
    dispatch(disposeAction);
  }
  for (final watchAction in _watchActions) {
    watchAction.cancel();
  }
  super.dispose();
}