tray_core 1.0.1
tray_core: ^1.0.1 copied to clipboard
Pure-Dart and FFI cross-platform desktop system tray and popup menu engine for Flutter across Linux, macOS, and Windows.
1.0.1 #
macOS AppKit tray lifecycle and click-responsiveness fixes (with zero modifications to the Linux and Windows backends).
macOS (platform/macos/) #
- Automatic Status Bar Cleanup on OS Termination (
TrayCoreTerminateObserver): ObserveNSApplicationWillTerminateNotificationusing a Hot-Restart-safe Objective-C observer (class_replaceMethod) soMacOSTrayBackendautomatically callsdispose()([[NSStatusBar systemStatusBar] removeStatusItem:]) when the application exits via Dock Quit orCmd+Q. - Immediate Flutter Run-Loop Wakeup on Menu Click: Schedule
Timer.run+ guardedWidgetsBinding.instance..ensureVisualUpdate()..scheduleFrame()insideTrayCoreMenuTarget.onTrayMenuItemClicked:so async menu click handlers execute immediately after returning fromNativeCallable.isolateLocal.
1.0.0 #
- Initial stable release of
tray_core(1.0.0) — pure-Dart and FFI cross-platform desktop system tray and popup menu engine across Linux, macOS, and Windows with zero C++/CMake/Swift plugin wrappers and zero dependency ontray_manager,nativeapi, ornative_core. - Symmetric 3-OS Architecture (
TrayBackend.forCurrentPlatform(applicationId: ..., windowsIconId: ...)):- Linux (
LinuxDbusTrayBackend,TrayDbusMenuObject,checkLinuxTraySupport): Pure-Dartorg.kde.StatusNotifierItem+com.canonical.dbusmenuimplementation overdbus(^0.8.0) with inline PNGicon-data, ARGB32IconPixmapdecoding, Wayland$XDG_RUNTIME_DIR/bustrailing-slash normalization, GNOME AppIndicator auto-remediation, andNameOwnerChangedwatcher re-registration. - macOS (
MacOSTrayBackend,setMacOSMenuItemImageVisibility): Cached Objective-C runtime (libobjc.A.dylib) bindings forNSStatusBar,NSStatusItem,NSMenu, andNSMenuItem, sanitized UTF-8 marshaling with@""fallback, templateNSImagerendering,class_replaceMethodHot Restart-safe menu click rebinding, and macOS 27+preferredImageVisibilityruntime-guarded visibility. - Windows (
WindowsTrayBackend): Cached Win32 bindings withHWND-keyed message dispatch, Hot Restart-safeDefWindowProcWclass registration + per-HWNDGWLP_WNDPROCbinding/restoration, configurableiconId(NOTIFYICONDATAW.uID), full976-byte (64-bit) /956-byte (32-bit)NOTIFYICONDATAWABI struct, top-levelWS_EX_TOOLWINDOW | WS_POPUPhost window, synchronous foreground ownership claim on left-click (WM_LBUTTONUP/NIN_SELECT/NIN_KEYSELECT),TaskbarCreatedrecovery,PostMessageW(..., WM_NULL)dismissal, and32×32Premultiplied BGRACreateDIBSectionHBITMAPmenu icons attached strictly afterAppendMenuW.
- Linux (