FTooltipController constructor

FTooltipController({
  1. required TickerProvider vsync,
  2. FTooltipMotion motion = const FTooltipMotion(),
})

Creates a FTooltipController with the given vsync and motion.

Implementation

FTooltipController({required TickerProvider vsync, FTooltipMotion motion = const FTooltipMotion()}) {
  _animation = AnimationController(
    vsync: vsync,
    duration: motion.entranceDuration,
    reverseDuration: motion.exitDuration,
  );
  _curveFade = CurvedAnimation(parent: _animation, curve: motion.fadeInCurve, reverseCurve: motion.fadeOutCurve);
  _curveScale = CurvedAnimation(parent: _animation, curve: motion.expandCurve, reverseCurve: motion.collapseCurve);
  _fade = motion.fadeTween.animate(_curveFade);
  _scale = motion.scaleTween.animate(_curveScale);
}