To install this linter you have to add it in your
pubspec.yaml as follows:
and then, in your
To get the linter run you firstly have to download your localizations with
flutter pub run hardcoded_strings -a <YOUR-API-KEY>
and all the keys you have in your workspace will be downloaded in the file
ditto_keys.json which will be read from the linter.
You can configure this linter by addind some keys inside your
analysis_options.yaml. Available keys are listed down here, and all of them are optional.
# Integer value that defines the min length of the string to be evaluated
# All keys below accept values in (info, warning, error)
# Specifies how should be considered the strings that are invalid Ditto keywords, i.e. the keys
# not contained in the file generated during the first run
# Specifies how should be considered the hardcoded strings inside your widgets