antler119 / system_tray

A Flutter package that makes it easy to customize and work with your Flutter desktop app's system tray.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Adaptive Status Bar Icon

smpgallagher opened this issue · comments

The icon doesn't change color when the status bar changes color.
In macos, you set a menuitem image from an asset to enable adaptive icons (black / white status bar toggle)
Adding a channel for the following code allows for use of the asset

func setStatusBarImage(_ call: FlutterMethodCall, _ result: FlutterResult)
{
let assetName = call.arguments as? String
if assetName != nil {
statusItem?.button?.image = NSImage.init(named: assetName!)
result(true)
}
result(false)
}

You need to add below line
statusItem?.button?.image?.isTemplate = true

Have you found a solution to this issue? If so, could you share it with us? Thanks in advance