showTrayIcon method

Future<void> showTrayIcon({
  1. String? iconPath,
  2. String? tooltip,
})

Show system tray icon

Implementation

Future<void> showTrayIcon({
  String? iconPath,
  String? tooltip,
}) async {
  try {
    await methodChannel.invokeMethod<void>('showTrayIcon', {
      'iconPath': iconPath,
      'tooltip': tooltip,
    });
  } on PlatformException catch (e) {
    throw MCPPlatformException('Failed to show tray icon', e.code, e.details);
  }
}