hide method

void hide({
  1. int? duration,
  2. int? hideDelay,
})

Hides the tooltip if it is currently displayed. *duration - the duration in milliseconds for which the tooltip animation needs to happen. *hideDelay - the duration in milliseconds after which the tooltip needs to be hidden

Implementation

void hide({int? duration, int? hideDelay}) {
  if (!_hidden || hideDelay == 0) {
    _timer?.cancel();
    _hidden = true;
    _timer = Timer(Duration(milliseconds: hideDelay ?? widget.duration), () {
      _previousTooltipData = null;
      if (animationController != null) {
        animationController!.duration = Duration(milliseconds: duration ?? 0);
        animationController!.reverse(from: 1.0);
      }
    });
  }
}