handlePreShowing method

void handlePreShowing()

Method that will be called when AbstractTransitionComponent first enters the preShowing state.

Implementation

void handlePreShowing() {
  onNextTransitionEnd(() {
    if (state.transitionPhase == TransitionPhase.SHOWING) {
      setState(newState()
        ..transitionPhase = TransitionPhase.SHOWN
      );
    }
  });

  // Force a repaint by accessing `offsetHeight` so that the changes to CSS classes are guaranteed to trigger a transition when it is applied
  getTransitionDomNode()?.offsetHeight;

  setState(newState()
    ..transitionPhase = TransitionPhase.SHOWING
  );
}