dispose method

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

Reimplemented from ChangeNotifier. Discards any resources used by the object. After this is called, the object is not in a usable state and should be discarded (calls to addListener and removeListener will throw after the object is disposed).

This method should only be called by the object's owner.

Implementation

@override
@mustCallSuper
void dispose() {
  assert(_debugAssertNotDisposed());
  _globalListeners = null;
  _propertyListeners = null;
  super.dispose();
}