WidgetDescriptor
Provides metadata about the widget (such as name, description, available events and properties) without having to instantiate it. Used for command palettes, AI, etc
Constructors
new WidgetDescriptor()
new WidgetDescriptor(
dart):WidgetDescriptor
Creates a widget descriptors from the Dart instance. Do not call directly.
Parameters
| Parameter | Type |
|---|---|
dart | any |
Returns
Source
Properties
| Property | Type |
|---|---|
_props? | Property[] |
dart | any |
Accessors
description
getdescription():string
Widget description
Returns
string
Source
name
getname():string
Widget name. Save as Viewer.type
Returns
string
Source
properties
getproperties():Property[]
Widget properties
Returns
Property[]
Source
synonyms
getsynonyms():string[]
Widget synonyms (mostly used for AI)
Returns
string[]
Source
Methods
createIcon()
createIcon():
Element
Creates an icon for that widget.
Returns
Element
Source
getByName()
staticgetByName(name):null|WidgetDescriptor
Returns the descriptor with the specified name.
Parameters
| Parameter | Type |
|---|---|
name | string |
Returns
null | WidgetDescriptor
Source
getDescriptors()
staticgetDescriptors():WidgetDescriptor[]
Returns all registered widget descriptors.