hasText method

WidgetMatcher<Text> hasText(
  1. String? value
)

Expects that text of Text equals (==) value.

Example usage:

spot<Text>().existsOnce().hasText('foo');

Implementation

WidgetMatcher<Text> hasText(String? value) {
  return hasDiagnosticProp<String>(
      'data', (it) => value == null ? it.isNull() : it.equals(value));
}