ensureTooltipVisible method Null safety

bool ensureTooltipVisible()

Shows the tooltip if it is not already visible.

Returns false when the tooltip shouldn't be shown or when the tooltip was already visible.


bool ensureTooltipVisible() {
  if (!_visible || !mounted) {
    return false;
  _showTimer = null;
  _forceRemoval = false;
  if (_isConcealed) {
    if (_mouseIsConnected) {
    return true;
  if (_entry != null) {
    // Stop trying to hide, if we were.
    _dismissTimer = null;
    return false; // Already visible.
  return true;