offstage property

bool get offstage

Whether this route is currently offstage.

On the first frame of a route's entrance transition, the route is built Offstage using an animation progress of 1.0. The route is invisible and non-interactive, but each widget has its final size and position. This mechanism lets the HeroController determine the final local of any hero widgets being animated as part of the transition.

The modal barrier, if any, is not rendered if offstage is true (see barrierColor).

Whenever this changes value, changedInternalState is called.

Implementation

bool get offstage => _offstage;
set offstage (bool value)

Implementation

set offstage(bool value) {
  if (_offstage == value) {
    return;
  }
  setState(() {
    _offstage = value;
  });
  _animationProxy!.parent = _offstage ? kAlwaysCompleteAnimation : super.animation;
  _secondaryAnimationProxy!.parent = _offstage ? kAlwaysDismissedAnimation : super.secondaryAnimation;
  changedInternalState();
}