withText method

  1. @useResult
WidgetSelector<Text> withText(
  1. String? value
)

Creates a WidgetSelector that finds all Text where text equals (==) value.

Example usage:

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

Implementation

@useResult
WidgetSelector<Text> withText(String? value) {
  return withDiagnosticProp<String>(
      'data', (it) => value == null ? it.isNull() : it.equals(value));
}