Finder text(String text, { bool skipOffstage: true })

Finds Text widgets containing string equal to the text argument.

Example:

expect(tester, hasWidget(find.text('Back')));

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

Source

Finder text(String text, { bool skipOffstage: true }) => new _TextFinder(text, skipOffstage: skipOffstage);