very_good_analysis icon indicating copy to clipboard operation
very_good_analysis copied to clipboard

feat: Add a lint to avoid hardcoded strings

Open ShahSomething opened this issue 7 months ago • 0 comments

Description

It would be helpful to add a lint that flags hardcoded strings in Dart/Flutter code. Hardcoded strings can make localization and maintenance more difficult, especially in larger apps. A lint to detect these would help enforce best practices and encourage the use of constants, resource files, or localization frameworks like flutter_localizations.

Example

// Bad
Text('Welcome');

// Good
Text(AppStrings.welcome); 

Requirements

  • [ ] All CI/CD checks are passing.
  • [ ] There is no drop in the test coverage percentage.

Additional Context

No response

ShahSomething avatar May 30 '25 09:05 ShahSomething