attachToApp method

void attachToApp()

绑定为当前 MyApp 门闩,并按有无叠层重置静态量。

Implementation

void attachToApp() {
  MyApp._splashGate?.dispose();
  MyApp._splashGate = this;
  _animationDone = !hasBrandLottie;
  _minVisibleElapsed = !hasStaticBrandFace;
  if (!hasOverlay) {
    _finished = true;
    _phase = MySplashPhase.finished;
  } else {
    _finished = false;
    _phase = MySplashPhase.running;
  }
  MyApp.isSplashFinished.value = _finished;
  MyApp.isBootstrapReady.value = false;
  MyApp.splashPhase.value = _phase;
  MyApp.splashFatalMessage = null;
}