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