DVTray class
The tray icon: the macOS status bar, the Windows notification area, a StatusNotifierItem on Linux.
show puts it up; update changes the icon, tooltip or menu of the one
that is up, in place, without taking it down -- a VPN swapping its
connected and disconnected icons does not flicker. A click on the icon
itself reaches onActivate where the desktop has such a click (Windows
and Linux; a macOS status item always opens its menu).
Constructors
- DVTray()
-
const
Properties
-
activated
→ Stream<
void> -
Every click on the icon itself, where the desktop sends one and
onActivatewas given.no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- isShown → bool
-
Whether the icon is up.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
selected
→ Stream<
String> -
Every tray menu item chosen, by id.
no setter
Methods
-
hide(
) → Future< void> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
show(
{required DVAssetRef icon, String? tooltip, void onSelected(String id)?, bool template = false, void onActivate()?}) → Future< void> -
Shows the icon with
menu, and runsonSelectedwith the id of any item chosen from it. -
toString(
) → String -
A string representation of this object.
inherited
-
update(
{DVAssetRef? icon, String? tooltip, bool? template}) → Future< void> - Changes the icon, tooltip or menu of the icon that is up, keeping whatever is not given and the handlers show was given. Refused when nothing is shown: an update that put up an icon would be a show nobody asked for.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
activate(
) → void -
For platform bindings: the icon itself was clicked. Reaches nobody
when no
onActivatewas given, because the binding then opened the menu instead. -
dispatch(
String id) → void - For platform bindings: an item of the shown menu was chosen. An id the menu does not have -- a stale command after hide, a submenu, a header, a disabled item -- reaches nobody.
-
reset(
) → void