byIcon method

Finder byIcon (IconData icon, { bool skipOffstage: true })

Finds Icon widgets containing icon data equal to the icon argument.

Sample code

expect(find.byIcon(Icons.inbox), findsOneWidget);

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

Implementation

Finder byIcon(IconData icon, { bool skipOffstage = true }) => _WidgetIconFinder(icon, skipOffstage: skipOffstage);