TrayIcon class
A system tray icon.
Call show to show the icon. And call dispose once you don't need it anymore.
With setTooltip, setImage and hide you can change the appearance of the icon.
If an icons has been disposed,
isActive will return false
.
And you cannot interact with it anymore.
Construct a new one.
To nuke all existing icons, use TrayIcon.clearAll
- Available extensions
Constructors
- TrayIcon.new({Id? id})
- Creates a new TrayIcon that controls a single icon in the system tray.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isActive → bool
-
Has this class been disposed?
no setter
- isVisible → bool
-
Is this TrayIcon currently visible?
no setter
- onDoubleTap ↔ EventCallback?
-
Available on TrayIcon, provided by the InteractionHandling extension
The callback that is currently being runonTap
.getter/setter pair - onPointerMove ↔ EventCallback?
-
Available on TrayIcon, provided by the InteractionHandling extension
The callback that is currently being runonTap
.getter/setter pair - onSecondaryDoubleTap ↔ EventCallback?
-
Available on TrayIcon, provided by the InteractionHandling extension
The callback that is currently being runonTap
.getter/setter pair - onSecondaryTap ↔ EventCallback?
-
Available on TrayIcon, provided by the InteractionHandling extension
The callback that is currently being runonTap
.getter/setter pair - onSecondaryTapDown ↔ EventCallback?
-
Available on TrayIcon, provided by the InteractionHandling extension
The callback that is currently being runonTap
.getter/setter pair - onSecondaryTapUp ↔ EventCallback?
-
Available on TrayIcon, provided by the InteractionHandling extension
The callback that is currently being runonTap
.getter/setter pair - onTap ↔ EventCallback?
-
Available on TrayIcon, provided by the InteractionHandling extension
The callback that is currently being runonTap
.getter/setter pair - onTapDown ↔ EventCallback?
-
Available on TrayIcon, provided by the InteractionHandling extension
The callback that is currently being runonTap
.getter/setter pair - onTapUp ↔ EventCallback?
-
Available on TrayIcon, provided by the InteractionHandling extension
The callback that is currently being runonTap
.getter/setter pair - onTertiaryDoubleTap ↔ EventCallback?
-
Available on TrayIcon, provided by the InteractionHandling extension
The callback that is currently being runonTap
.getter/setter pair - onTertiaryTapDown ↔ EventCallback?
-
Available on TrayIcon, provided by the InteractionHandling extension
The callback that is currently being runonTap
.getter/setter pair - onTertiaryTapUp ↔ EventCallback?
-
Available on TrayIcon, provided by the InteractionHandling extension
The callback that is currently being runonTap
.getter/setter pair - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
dispose(
) → Future< void> - Disposes the icon.
-
hide(
) → Future< void> - Hides the icon from the system tray.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setImage(
{TrayIconImageDelegate? delegate, Uri? path, ByteBuffer? pixels, String? asset, StockIcon? stockIcon, WinIcon? winIcon}) → Future< void> - Sets the image on this icon.
-
setTooltip(
String? message) → Future< void> -
Sets the tooltip text. If
message
isnull
, the tooltip is removed. -
show(
) → Future< void> - Shows the icon in the system tray.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- preferredImageSize → Size
-
The size an icon image set via setImage should be.
no setter
- preferredLargeImageSize → Size
-
The size a large icon, for example for a notification bubble
should be.
no setter
Static Methods
-
clearAll(
) → void - Disposes all icons and clears up any residual icons.
-
of(
BuildContext context) → TrayIcon - Retrieve the TrayIcon managed by a TrayIconWidget further up the tree.