changedInternalState method

  1. @override
void changedInternalState()

Called whenever the internal state of the route has changed.

This should be called whenever willHandlePopInternally, didPop, ModalRoute.offstage, or other internal state of the route changes value. It is used by ModalRoute, for example, to report the new information via its inherited widget to any children of the route.

See also:


void changedInternalState() {
  // No need to mark dirty if this method is called during build phase.
  if (SchedulerBinding.instance.schedulerPhase != SchedulerPhase.persistentCallbacks) {
    setState(() { /* internal state already changed */ });
  _modalScope.maintainState = maintainState;