ensureTooltipVisible method
Shows the tooltip if it is not already visible.
After made visible by this method, The tooltip does not automatically
dismiss after waitDuration
, until the user dismisses/re-triggers it, or
Tooltip.dismissAllToolTips is called.
Returns false
when the tooltip shouldn't be shown or when the tooltip
was already visible.
Implementation
bool ensureTooltipVisible() {
if (!_visible) {
return false;
}
_timer?.cancel();
_timer = null;
if (_controller.isForwardOrCompleted) {
return false;
}
_scheduleShowTooltip(withDelay: Duration.zero);
return true;
}