Repository navigation
tray_manager is now built on nativeapi: the
per-platform plugin code is gone, and one C++ core drives macOS, Windows and Linux.
- Breaking:
package:tray_manager/tray_manager.dartexports the native API —
TrayIcon,Menu,MenuItem,Imageand their events. Several tray icons at once,
double-click events,contextMenuTrigger, menu item icons, radio groups and
accelerators come with it. - The 0.5.x API moved to
package:tray_manager/legacy.dart:trayManager,
TrayListener, and aMenu/MenuItempair with themenu_baseshape (menu_base
itself is no longer a dependency). Existing apps change one import. It is a bridge:
everything in it is@Deprecatedand will be removed in a later release. The README
lists the behaviour differences and maps each old call to the native API. - Breaking: requires Flutter 3.47 / Dart 3.13 and macOS 10.15, and depends on
nativeapi ^0.3.0. CI builds and the publish workflow pin Flutter 3.47.5. - Linux: the tray icon is a StatusNotifierItem, and
setToolTipworks. Tray icon clicks
are not reported there — the panel keeps them and opens the menu itself, as it did
in 0.5.x. Builds need GTK 3, X11 and Xi development files;libayatana-appindicator3-dev
is not one of them (nativeapi 0.3.0 stopped requiring and linking it). - Windows:
.pngicons work as well as.ico. MenuItem.label,toolTip,checkedanddisabledof the legacy API update the
visible menu when assigned;onClickruns once per click, with or without a
TrayListener. A native checkbox item is not toggled by a click.- New example on
package:flutter/widgets.dartalone; the full one is nativeapi's
tray_icon_example.
Upgrading from 0.5.x
Change one import and existing code keeps working: package:tray_manager/legacy.dart carries the 0.5.x API (trayManager, TrayListener, and a Menu / MenuItem pair with the menu_base shape, without depending on menu_base). Everything in it is deprecated and goes away in a later release; the README maps each old call to its native counterpart.
On Linux, one behaviour differs and will not come back: tray icon clicks are not reported — the panel keeps them and opens the menu itself.
📦 https://pub.dev/packages/tray_manager/versions/0.7.0
Full Changelog: v0.5.3...v0.7.0