widgetList<T extends Widget> method

Iterable<T> widgetList <T extends Widget>(Finder finder)

The matching widgets in the widget tree.

  • Use widget if you only expect to match one widget.
  • Use firstWidget if you expect to match several but only want the first.

Implementation

Iterable<T> widgetList<T extends Widget>(Finder finder) {
  TestAsyncUtils.guardSync();
  return finder.evaluate().map<T>((Element element) {
    final T result = element.widget;
    return result;
  });
}