hide method

Future<void> hide()

Hides the icon from the system tray.

Internally the icon is actually unregistered from the system entirely, however this plugin still keeps track of it to be able to show it again.

Implementation

Future<void> hide() async {
  _ensureIsActive();
  if (!_isVisible) return;
  if (!_isReal) return;

  await _plugin.hideIcon(_id);
  _isVisible = false;
}