reassemble method
During development, if a hot reload occurs, the reassemble method is called. This provides an opportunity to reinitialize any data that was prepared in the initState method.
Implementation
@override
@mustCallSuper
void reassemble() {
// Don't if the State object is defunct.
if (!mounted) {
return;
}
/// No 'setState()' functions are allowed to fully function at this point.
_setStateAllowed = false;
for (final con in controllerList) {
//
con.reassemble();
}
super.reassemble();
_setStateAllowed = true;
/// No 'setState()' function is necessary
/// The framework always calls build with a hot reload.
_setStateRequested = false;
// Record the triggered event
assert(() {
if (_printEvents) {
debugPrint('============ Event: reassemble() in $this');
}
return true;
}());
}