Finder byElementType(Type type, { bool skipOffstage: true })

Finds widgets by searching for elements with a particular type.

This does not do subclass tests, so for example byElementType(VirtualViewportElement) will never find anything since that's an abstract class.

The type argument must be a subclass of Element.

Example:

expect(tester, hasWidget(find.byElementType(SingleChildRenderObjectElement)));

If the skipOffstage argument is true (the default), then this skips nodes that are Offstage or that are from inactive Routes.

Source

Finder byElementType(Type type, { bool skipOffstage: true }) => new _ElementTypeFinder(type, skipOffstage: skipOffstage);