didPop method

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

Called when this route has been popped off.

Implementation

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

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

  _setStateAllowed = true;

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