Skip to main content

prefer-custom-finder-over-find

added in: 1.8.0
Pro+

Suggests using custom finders instead of find in Patrol tests.

Example

❌ Bad:

void main() {
patrolTest('widget test', () {
...
find.byType(SomeType); // LINT: Prefer custom finder ($) over 'find'.
find.text('SomeText'); // LINT: Prefer custom finder ($) over 'find'.
});
}

✅ Good:

void main() {
patrolTest('widget test', () {
...
$(SomeType);
$('SomeText');
});
}