deprecated_ lint
The lint rule '{0}' is deprecated and shouldn't be enabled.
Description
#The analyzer produces this diagnostic when an enabled lint rule is deprecated.
Example
#
The following code produces this diagnostic because the rule
always_specify_types is deprecated:
// %uri="analysis_options.yaml"
linter:
rules:
- always_specify_types
- annotate_overrides
Common fixes
#If a replacement rule exists, enable it:
// %uri="analysis_options.yaml"
linter:
rules:
- annotate_overrides
- specify_nonobvious_property_types
If no replacement rule exists, remove the deprecated lint rule from the list:
// %uri="analysis_options.yaml"
linter:
rules:
- annotate_overrides
Unless stated otherwise, the documentation on this site reflects Dart 3.10.3. Page last updated on 2025-12-5. View source or report an issue.