byPredicate function

Finder byPredicate(
  1. bool predicate(
    1. Widget widget
    ), {
  2. String? description,
})

Matches any element whose widget satisfies predicate. description is shown in test failure messages.

Implementation

Finder byPredicate(
  bool Function(Widget widget) predicate, {
  String? description,
}) => _PredicateFinder(predicate, description);