Skip to main content

prefer-symbol-over-key

added in: 1.8.0

Suggests using symbols instead of string keys in Patrol tests.

Example

❌ Bad:

void main() {
patrolTest('widget test', () {
...
$(Key('button')); // LINT
});
}

✅ Good:

void main() {
patrolTest('widget test', () {
...
$(#button);
});
}