componentWillUnmount method
ReactJS lifecycle method that is invoked immediately before a Component
is unmounted from the DOM.
Perform any necessary cleanup in this method, such as invalidating timers or cleaning up any DOM Element
s that
were created in componentDidMount.
See: reactjs.org/docs/react-component.html#componentwillunmount
Implementation
@mustCallSuper
@override
void componentWillUnmount() {
super.componentWillUnmount();
_isUnmounted = true;
_cancelTransitionEndTimer();
_cancelTransitionEventListener();
}