withText method

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

Example usage:

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

Implementation

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