setBadgeCount

abstract external fun setBadgeCount(count: Double = definedExternally): Boolean(source)

Whether the call succeeded.

Sets the counter badge for current app. Setting the count to 0 will hide the badge.

On macOS, it shows on the Dock icon. On Linux, it shows on docks and taskbars that support the LauncherEntry D-Bus API,

!NOTE On Linux, the badge is associated with the app's .desktop file, so app.setDesktopName (or the desktopName field in package.json) must match the name of the app's actual .desktop file.

!NOTE On macOS, you need to ensure that your application has the permission to display notifications for this method to work.