ThemeIcon class
A reference to a named icon. Currently, {@link ThemeIcon.FileFile}, {@link ThemeIcon.FolderFolder}, and ThemeIcon ids are supported. Using a theme icon is preferred over a custom icon as it gives product theme authors the possibility to change the icons.
Note that theme icons can also be rendered inside labels and descriptions. Places that support theme icons spell this out
and they use the $(<name>)
-syntax, for instance quickPick.label = "Hello World $(globe)"
.
- Available extensions
- Annotations
-
- @JS()
- @staticInterop
Constructors
- ThemeIcon(String id, [ThemeColor? color])
-
factory
Properties
- color → ThemeColor?
-
Available on ThemeIcon, provided by the ThemeIcon$Typings extension
The optional ThemeColor of the icon. The color is currently only used in {@link TreeItem}.no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
Available on ThemeIcon, provided by the ThemeIcon$Typings extension
The id of the icon. The available icons are listed in https://code.visualstudio.com/api/references/icons-in-labels#icon-listing.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- file → ThemeIcon
-
Reference to an icon representing a file. The icon is taken from the current file icon theme or a placeholder icon is used.
no setter
- folder → ThemeIcon
-
Reference to an icon representing a folder. The icon is taken from the current file icon theme or a placeholder icon is used.
no setter