didPushNext method
New route has been pushed, and this route is no longer visible.
Implementation
@override
@mustCallSuper
void didPushNext() {
// Don't if the State object is defunct.
if (!mounted) {
return;
}
// No 'setState()' functions are allowed
_setStateAllowed = false;
for (final con in controllerList) {
con.didPushNext();
}
_setStateAllowed = true;
if (_setStateRequested) {
_setStateRequested = false;
// Only the latest State is rebuilt
if (isLastState) {
// Perform a 'rebuild' if requested.
setState(() {});
}
}
// Record the triggered event
assert(() {
if (_printEvents) {
debugPrint('============ Event: didPushNext() in $this');
}
return true;
}());
}