Add an ArkUIBuilder widget to the project
add_widgetCopies a catalog widget's component file into your HarmonyOS module and adds its import to a target .ets page, returning the build() call to paste. Set overwrite to replace an existing file.
Instructions
Copies a widget's component into /src/main/ets/components/.ets and adds its import to target_file. Returns the call to place in build(). Never overwrites a different existing file unless overwrite is true.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Component name, id or title | |
| overwrite | No | Replace an existing, different components/<Name>.ets (default false) | |
| target_file | Yes | Absolute path of the .ets page that will use it, inside <module>/src/main/ets (may not exist yet) |