didPushNext method

  1. @override
  2. @protected
  3. @mustCallSuper
void didPushNext()
inherited

New route has been pushed, and this route is no longer visible.

Implementation

@override
@protected
@mustCallSuper
void didPushNext() {
  // No 'setState()' functions are allowed
  _setStateAllowed = false;

  for (final listener in _beforeList) {
    listener.didPushNext();
  }
  for (final con in _controllerList) {
    con.didPushNext();
  }
  for (final listener in _afterList) {
    listener.didPushNext();
  }

  _setStateAllowed = true;

  if (_setStateRequested) {
    _setStateRequested = false;
    // Only the latest State is rebuilt
    if (isEndState) {
      // Perform a 'rebuild' if requested.
      setState(() {});
    }
  }
}