hide method
Hides the window.
Listeners get onWindowEvent('hide') when this call hides a window that
was visible or minimized. Also cancels a show that is waiting for a
window to be found.
Implementation
Future<void> hide() async {
_pendingShowInactive = null;
final window = _target;
if (window == null) return;
// macOS reports a minimized window as not visible.
final wasShown = window.isVisible || window.isMinimized;
window.hide();
if (wasShown && !window.isVisible) _emit(_kWindowEventHide);
}