scheduleHide static method

void scheduleHide({
  1. bool smooth = false,
})

Implementation

static void scheduleHide({bool smooth = false}) {
  _closeTimer?.cancel();
  _smoothCloseTimer?.cancel();

  final delay = smooth ? TSidebarConstants.smoothHideDelay : const Duration(milliseconds: 300);

  if (smooth) {
    _smoothCloseTimer = Timer(delay, () {
      if (!_isMouseInOverlayArea && _mouseInAreaCount <= 0) {
        hideAllOverlays(smooth: true);
      }
    });
  } else {
    _closeTimer = Timer(delay, () {
      if (!_isMouseInOverlayArea && _mouseInAreaCount <= 0) {
        hideAllOverlays(smooth: true);
      }
    });
  }
}