WAB Widgets affect layer visibility

It would be nice to be able to have the option in WAB widget configs to turn on one or more of the relevant layers when the widget opens.

For example, I'd like to use multiple District Lookup widgets in an app, but having all the point layers turned on at once is very messy. I'd like the point layers to turn on when its particular widget is opened.

There are various threads out there where people have made edits to the code to get this functionality, however this is confusing to implement with all the different widgets available.