text method

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

Finds Text and EditableText widgets containing string equal to the text argument.

Sample code

expect(find.text('Back'), findsOneWidget);

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

Implementation

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