dismissAllToolTips static method

bool dismissAllToolTips()

Dismiss all of the tooltips that are currently shown on the screen.

This method returns true if it successfully dismisses the tooltips. It returns false if there is no tooltip shown on the screen.

Implementation

static bool dismissAllToolTips() {
  if (_openedTooltips.isNotEmpty) {
    // Avoid concurrent modification.
    final openedTooltips = _openedTooltips.toList();
    for (final state in openedTooltips) {
      state._dismissTooltip(immediately: true);
    }
    return true;
  }
  return false;
}