widgetList<T extends Widget> method

Iterable<T> widgetList<T extends Widget>(
  1. FinderBase<Element> 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.


Iterable<T> widgetList<T extends Widget>(finders.FinderBase<Element> finder) {
  return finder.evaluate().map<T>((Element element) {
    final T result = element.widget as T;
    return result;