init method

  1. @override
void init()
override

Implementation

@override
void init() {
  super.init();
  _toolsAnimationController = AnimationController(duration: const Duration(milliseconds: 300), vsync: this);
  _rightPanelController = AnimationController(duration: const Duration(milliseconds: 300), vsync: this);
  final headerComponentConfig = TCICController.instance.getComponentConfig<HeaderComponentConfig>(HeaderComponentConfig);

  if(headerComponentConfig?.useHorizontalHeaderLayout ?? false){
    // 当 useHorizontalHeaderLayout 为 true 时,动画改为左右方向的滑动动画
    _animation = _toolsAnimationController.drive(CurveTween(curve: Curves.easeInOut));
  }else{
    _animation = _toolsAnimationController.drive(CurveTween(curve: Curves.easeInOut));
  }

  _rightPanelAnimation = _rightPanelController.drive(CurveTween(curve: Curves.easeInOut));
  addEventChangeLister();
}