avoid-missing-tr-on-strings
Warns when the tr extension method is not called on string literals.
Example
❌ Bad:
void fn() {
// LINT: Missing 'tr' invocation on this string literal.
Text('str');
// LINT: Missing 'tr' invocation on this string literal.
Text(key: 1, 'str');
}
✅ Good:
void fn() {
Text('str'.tr());
Text('str').tr();
Text(key: 1, 'str'.tr());
}