spotTextWhere function
WidgetSelector<AnyText>
spotTextWhere(
- void match(), {
- List<
WidgetSelector< parents = const [],Widget> > - List<
WidgetSelector< children = const [],Widget> >
Finds text matching match
on the screen
This methods gives more control how the text is matched compared to spotText.
Text('Hello World');
// all match the Text widget above
spotTextWhere((it) => it.equals('Hello World'));
spotTextWhere((it) => it.startsWith('Hello'));
spotTextWhere((it) => it.endsWith('World!'));
spotTextWhere((it) => it.contains('Wo'));
spotText('Wo');
Implementation
@useResult
WidgetSelector<AnyText> spotTextWhere(
void Function(Subject<String>) match, {
List<WidgetSelector> parents = const [],
List<WidgetSelector> children = const [],
}) {
return _global.spotTextWhere(
match,
parents: parents,
children: children,
);
}