deactivate method

  1. @override
void deactivate()
inherited

The framework calls this method whenever it removes this StateX object from the tree. In many cases, it is about to be 'disposed of'.

Implementation

@override
void deactivate() {
  _errorHandler?.deactivate();
  super.deactivate(); // IMPORTANT to call last
}