updateNewStateX method
A State object may be unexpectedly re-created by a UniqueKey() in a parent for example. You have to 'update' the properties of the new StateX object using the old StateX object because it's going to be disposed of.
Implementation
void updateNewStateX(covariant StateX oldState) {
/// When a State object is destroyed and a new one is re-created!
/// Use the old one to update properties in the new StateX object.
}