byValue method
- Pattern value, {
- FlutterView? view,
Finds any SemanticsNodes that has a SemanticsNode.value that matches
the given value
.
The view
provided will be used to determine the semantics tree where
the search will be evaluated. If not provided, the search will be
evaluated against the semantics tree of WidgetTester.view.
Implementation
SemanticsFinder byValue(Pattern value, {FlutterView? view}) {
return byPredicate(
(SemanticsNode node) => _matchesPattern(node.value, value),
describeMatch: (Plurality plurality) => '${switch (plurality) {
Plurality.one => 'SemanticsNode',
Plurality.zero || Plurality.many => 'SemanticsNodes',
}} with value "$value"',
view: view,
);
}