BaseStatelessPage<T extends PageArgument?> constructor

BaseStatelessPage<T extends PageArgument?>(
  1. AppRouteArgument argument,
  2. Key key
)

Implementation

BaseStatelessPage(
  this.argument,
  Key key,
)   : data = argument.argument as T?,
      super(key: key) {
  currentKey = key;
  WidgetsBinding.instance.addPostFrameCallback((_) {
    onFirstBuildFinish();
    try {
      Future.delayed(RouteKit.instance.stack.last.route.transitionDuration,
          () {
        // 动画构建完毕
        onTranslateAnimationFinish();
      });
    } catch (_) {}
  });
  if (null != systemUiOverlayStyle) {
    SystemChrome.setSystemUIOverlayStyle(systemUiOverlayStyle!);
  }
  init();
}