expectTextVisible function
Assert that the given text is visible in the widget tree.
Example:
expectTextVisible('Welcome');
expectTextVisible('Hello, John');
Implementation
void expectTextVisible(String text) {
expect(
find.text(text),
findsOneWidget,
reason: 'Expected text "$text" to be visible',
);
}