FTooltipController constructor
FTooltipController({
- required TickerProvider vsync,
- bool shown = false,
- FTooltipMotion motion = const .new(),
Creates a FTooltipController with the given vsync, shown and motion.
Implementation
FTooltipController({required TickerProvider vsync, bool shown = false, FTooltipMotion motion = const .new()}) {
if (shown) {
_overlay.show();
}
_animation = AnimationController(
vsync: vsync,
duration: motion.entranceDuration,
reverseDuration: motion.exitDuration,
)..value = shown ? 1 : 0;
_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);
}