In Configurable Map Viewer project, I'd like to be able to set the initial display of a widget to hidden and show it with a press of a button, for example, by clicking on a button in a toolbar. Take for instance the Legend widget, I don't want to see the Legend widget at all on the left Pane, but would like to add a button on top to toggle it on/off.
I added this line of code to controller.js, but with no luck.
if (options.hidden) {
domStyle.set(this[widgetConfig.id].domNode, "display", "none");
}