spotWidget<W extends Widget> function

WidgetSelector<W> spotWidget<W extends Widget>(
  1. W widget, {
  2. List<WidgetSelector<Widget>> parents = const [],
  3. List<WidgetSelector<Widget>> children = const [],
})

Creates a WidgetSelector that finds widget by identity and returns all occurrences of it in the widget tree

The comparison happens by identity (===)

Implementation

WidgetSelector<W> spotWidget<W extends Widget>(
  W widget, {
  List<WidgetSelector> parents = const [],
  List<WidgetSelector> children = const [],
}) {
  return _global.spotWidget<W>(
    widget,
    parents: parents,
    children: children,
  );
}