setIcon

external fun setIcon(icon: String?): Promise<Void>(source)
external fun setIcon(icon: Image?): Promise<Void>(source)
external fun setIcon(icon: Uint8Array<*>?): Promise<Void>(source)
external fun setIcon(icon: ArrayBuffer?): Promise<Void>(source)
external fun setIcon(icon: ReadonlyArray<Double>?): Promise<Void>(source)

Sets a new tray icon. If null is provided, it will remove the icon.

Note that you may need the image-ico or image-png Cargo features to use this API. To enable it, change your Cargo.toml file:

[dependencies]
tauri = { version = "...", features = ["...", "image-png"] }