SelectorQueries<W extends Widget> extension

Extension on WidgetSelector<W> for advanced widget querying.

Adds methods to refine widget selections based on elements, widgets, and their properties. Filters are applied during the snapshotting of the selector, enabling precise widget selection.

Each method requires a predicate and a description for clear error messages and precise selection.

on

Methods

whereElement(bool predicate(Element element), {required String description}) WidgetSelector<W>
Creates a filter for the discovered elements which is applied when the WidgetSelector is snapshotted.
whereWidget(bool predicate(W widget), {required String description}) WidgetSelector<W>
Creates a filter for the widgets of the discovered elements which is applied when the WidgetSelector is snapshotted.