Hi,
Currently, there is no default widget to do this. Although, there is a workaround. This can be achieved easily by adding all your search filters to a filtering entity with an enumeration with values Basic search, Advanced search, and setting the empty value can be used to hide all the filters. Upon selecting advanced search you have visibility set for all the required elements and a common Xpath written in the search nanoflow would help. Make sure to reset the values for advance search when you are turning back to basic else this will result in showing wrong values.
Hope this helps!