deactivate method
The framework calls this method whenever it removes this StateX
object
from the tree.
Implementation
@override
void deactivate() {
super.deactivate();
// No need. States do this themselves
// forEachState((state) {
// state.deactivate();
// }, reversed: true, remove: this);
// Return the original error handler
FlutterError.onError = _currentErrorFunc;
}