inIndexPath

WidgetQuery inIndexPath(Array<int> indexPath)

Adds the specified index path as one of the roots that will be searched. If any index path is added, this query won't do an exhaustive search over all roots, but rather consider the index paths given by this method (inIndexPath can be called more then once) as the roots of the search. This can help performance because an exhaustive search can be slow due to the amount of widgets to search. If there's a specific root index or some index path the widget is known to be under, it's recommended to supply at least the root index.

Return

this query

Parameters

indexPath

the index path of an widget to search as a root