dispose method

  1. @override
void dispose()
override

The framework calls this method when this StateX object will never build again and will be disposed of with garbage collection.

Implementation

@override
void dispose() {
  _appState = null;
  _child = null;
  _inheritedElement = null;
  _dependencies.clear();
  super.dispose();
}